From: jeason Date: Tue, 1 Aug 2017 08:28:09 +0000 (-0700) Subject: add checkProofOfWork X-Git-Tag: v1.0.5~511^2~4 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=239765746fd47dce13ac0a2a0ff74c1db6227c64;p=bytom%2Fbytom.git add checkProofOfWork --- diff --git a/rpc/core/generate.go b/rpc/core/generate.go index 2579e231..66c11bf7 100644 --- a/rpc/core/generate.go +++ b/rpc/core/generate.go @@ -66,9 +66,9 @@ func solveBlock(header *wire.BlockHeader, targetDifficulty *big.Int) bool { } func checkProofOfWork(header *wire.BlockHeader, targetDifficulty *big.Int) bool { - hash := hdr.BlockHash() + hash := header.BlockHash() if wire.HashToBig(&hash).Cmp(targetDifficulty) <= 0 { return true } + return false } -