@@ -201,7 +201,6 @@ type remoteSealer struct {
201201 ethash * Ethash
202202 noverify bool
203203 notifyURLs []string
204- notifyFull bool
205204 results chan <- * types.Block
206205 workCh chan * sealTask // Notification channel to push new work and relative result channel to remote sealer
207206 fetchWorkCh chan * sealWork // Channel used for remote sealer to fetch mining work
@@ -242,13 +241,12 @@ type sealWork struct {
242241 res chan [4 ]string
243242}
244243
245- func startRemoteSealer (ethash * Ethash , urls []string , notifyFull bool , noverify bool ) * remoteSealer {
244+ func startRemoteSealer (ethash * Ethash , urls []string , noverify bool ) * remoteSealer {
246245 ctx , cancel := context .WithCancel (context .Background ())
247246 s := & remoteSealer {
248247 ethash : ethash ,
249248 noverify : noverify ,
250249 notifyURLs : urls ,
251- notifyFull : notifyFull ,
252250 notifyCtx : ctx ,
253251 cancelNotify : cancel ,
254252 works : make (map [common.Hash ]* types.Block ),
@@ -360,8 +358,11 @@ func (s *remoteSealer) makeWork(block *types.Block) {
360358// new work to be processed.
361359func (s * remoteSealer ) notifyWork () {
362360 work := s .currentWork
361+
362+ // Encode the JSON payload of the notification. When NotifyFull is set,
363+ // this is the complete block header, otherwise it is a JSON array.
363364 var blob []byte
364- if s .notifyFull {
365+ if s .ethash . config . NotifyFull {
365366 blob , _ = json .Marshal (s .currentBlock .Header ())
366367 } else {
367368 blob , _ = json .Marshal (work )
0 commit comments