diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2017-01-13 07:37:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-13 07:37:23 +0800 |
commit | c5df37c1119107ddcc517127b3bd7c2ab4e3649f (patch) | |
tree | 22b72545e83ab83ddab5c531d46bdcffc8b8ae59 /core | |
parent | e0ceeab0d111ada7d847c83992d2ff3128bfb959 (diff) | |
download | go-tangerine-c5df37c1119107ddcc517127b3bd7c2ab4e3649f.tar.gz go-tangerine-c5df37c1119107ddcc517127b3bd7c2ab4e3649f.tar.zst go-tangerine-c5df37c1119107ddcc517127b3bd7c2ab4e3649f.zip |
eth: accept leading zeros for nonce parameter of submitWork (#3558)
Diffstat (limited to 'core')
-rw-r--r-- | core/types/block.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/types/block.go b/core/types/block.go index 2034bb0ff..1a2a1f2bd 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -423,9 +423,9 @@ func CalcUncleHash(uncles []*Header) common.Hash { // WithMiningResult returns a new block with the data from b // where nonce and mix digest are set to the provided values. -func (b *Block) WithMiningResult(nonce uint64, mixDigest common.Hash) *Block { +func (b *Block) WithMiningResult(nonce BlockNonce, mixDigest common.Hash) *Block { cpy := *b.header - binary.BigEndian.PutUint64(cpy.Nonce[:], nonce) + cpy.Nonce = nonce cpy.MixDigest = mixDigest return &Block{ header: &cpy, |