mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
replace ComputeMinWork with CheckMinWork
This commit is contained in:
@@ -106,11 +106,7 @@ static bool CheckNBits(unsigned int nbits1, int64_t time1, unsigned int nbits2,
|
||||
return CheckNBits(nbits2, time2, nbits1, time1);
|
||||
int64_t deltaTime = time2-time1;
|
||||
|
||||
uint256 required;
|
||||
required.SetCompact(ComputeMinWork(nbits1, deltaTime));
|
||||
uint256 have;
|
||||
have.SetCompact(nbits2);
|
||||
return (have <= required);
|
||||
return CheckMinWork(nbits2, nbits1, deltaTime);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(DoS_checknbits)
|
||||
|
||||
Reference in New Issue
Block a user