diff --git a/blockchain/validate.go b/blockchain/validate.go index ef4016be02..96a4e4fe8b 100644 --- a/blockchain/validate.go +++ b/blockchain/validate.go @@ -360,8 +360,8 @@ func checkProofOfWork(header *wire.BlockHeader, powLimit *big.Int, flags Behavio // CheckProofOfWork ensures the block header bits which indicate the target // difficulty is in min/max range and that the block hash is less than the // target difficulty as claimed. -func CheckProofOfWork(block *dcrutil.Block, powLimit *big.Int) error { - return checkProofOfWork(&block.MsgBlock().Header, powLimit, BFNone) +func CheckProofOfWork(header *wire.BlockHeader, powLimit *big.Int) error { + return checkProofOfWork(header, powLimit, BFNone) } // checkBlockHeaderSanity performs some preliminary checks on a block header to diff --git a/rpcserver.go b/rpcserver.go index 50e605b968..a77296c40a 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -4205,7 +4205,8 @@ func handleGetWorkSubmission(s *rpcServer, hexData string) (interface{}, error) block := dcrutil.NewBlockDeepCopyCoinbase(msgBlock) // Ensure the submitted block hash is less than the target difficulty. - err = blockchain.CheckProofOfWork(block, activeNetParams.PowLimit) + err = blockchain.CheckProofOfWork(&block.MsgBlock().Header, + activeNetParams.PowLimit) if err != nil { // Anything other than a rule violation is an unexpected error, // so return that error as an internal error.