@@ -30,6 +30,7 @@ import (
30
30
"time"
31
31
32
32
"github.com/ethereum/go-ethereum/common"
33
+ "github.com/ethereum/go-ethereum/common/hexutil"
33
34
"github.com/ethereum/go-ethereum/consensus"
34
35
"github.com/ethereum/go-ethereum/core/types"
35
36
"github.com/ethereum/go-ethereum/log"
@@ -193,7 +194,7 @@ func (ethash *Ethash) remote(notify []string, noverify bool) {
193
194
194
195
results chan <- * types.Block
195
196
currentBlock * types.Block
196
- currentWork [3 ]string
197
+ currentWork [4 ]string
197
198
198
199
notifyTransport = & http.Transport {}
199
200
notifyClient = & http.Client {
@@ -234,12 +235,14 @@ func (ethash *Ethash) remote(notify []string, noverify bool) {
234
235
// result[0], 32 bytes hex encoded current block header pow-hash
235
236
// result[1], 32 bytes hex encoded seed hash used for DAG
236
237
// result[2], 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty
238
+ // result[3], hex encoded block number
237
239
makeWork := func (block * types.Block ) {
238
240
hash := ethash .SealHash (block .Header ())
239
241
240
242
currentWork [0 ] = hash .Hex ()
241
243
currentWork [1 ] = common .BytesToHash (SeedHash (block .NumberU64 ())).Hex ()
242
244
currentWork [2 ] = common .BytesToHash (new (big.Int ).Div (two256 , block .Difficulty ()).Bytes ()).Hex ()
245
+ currentWork [3 ] = hexutil .EncodeBig (block .Number ())
243
246
244
247
// Trace the seal work fetched by remote sealer.
245
248
currentBlock = block
0 commit comments