tradecraftio / tradecraft

Tradecraft integration/staging tree https://tradecraft.io/download
Other
13 stars 9 forks source link

Add option to prevent IBD based on tip age #47

Open maaku opened 5 years ago

maaku commented 5 years ago

The following line causes the daemon to enter initial-block-download state if the chain tip is older than nMaxTipAge, which is currently hard coded to 1 day.

https://github.com/tradecraftio/tradecraft/blob/b10b2477323e551468eae7b3147d5a6d91c17b97/src/main.cpp#L1583

This is generally good advice and should be the default, but unfortunately miners running this code will have their mining APIs turn off as soon as one day goes by without finding a block. And unfortunately this is a common occurrence on Tradecraft, where there is still large difficulty and hashrate swings. The last few times this happened basically the whole network shut down, until someone found a block--a chicken-and-the-egg problem.

Some mining pools are currently running with this check disabled in custom-build binaries. But there should be a configuration file setting that either configures this check or disables it entirely, to be used by mining pools who know what they are doing.