From 239765746fd47dce13ac0a2a0ff74c1db6227c64 Mon Sep 17 00:00:00 2001 From: jeason Date: Tue, 1 Aug 2017 01:28:09 -0700 Subject: [PATCH] add checkProofOfWork --- rpc/core/generate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 } - -- 2.11.0