From c5df37c1119107ddcc517127b3bd7c2ab4e3649f Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 13 Jan 2017 00:37:23 +0100 Subject: eth: accept leading zeros for nonce parameter of submitWork (#3558) --- core/types/block.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') 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, -- cgit v1.2.3