tradecraftio / tradecraft

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

Delay block file size increase until after the protocol cleanup rules activate #36

Closed maaku closed 5 years ago

maaku commented 5 years ago

This is a follow-up to #26. By comparing against GetAdjustedTime we can check if we are running in the protocol cleanup regime, and only then use the higher limits for block file size. In the mean time we'll still use smaller block files which is beneficial for pruning.

It's slightly layer violating to access the chain consensus parameters in some cases, e.g. from the network and protocol message handling code. But it doesn't break the build and is better than the alternative.