lbryio / lbrycrd

The blockchain that provides the digital content namespace for the LBRY protocol
https://lbry.com
MIT License
2.57k stars 178 forks source link

fix fPowAllowMinDifficultyBlocks to work on the testnet #141

Closed kaykurokawa closed 6 years ago

kaykurokawa commented 6 years ago

chainparams parameter : fPowAllowMinDifficultyBlocks , which is set to true only on testnet, was designed to allow the difficulty to adjust to the minimum difficulty if a block was not found within 2x target block time.

This parameter was not working due to the fact that we'd never enter the if statement in line https://github.com/lbryio/lbrycrd/blob/master/src/pow.cpp#L23 since our params.DifficultyAdjustmentInterval() is 1

This has been fixed and should allow testnet to proceed when a large amount of hashrate drops off the network.