mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge #11340: Trivial: Fix validation comments
a0b4c2461
Trivial: Fix validation comments (Dan Raviv)
Pull request description:
- Move comment about transaction/block weight calculation so it applies not only to the GetBlockWeight function but also to GetTransactionWeight
- Fix comment in validation.cpp referencing future deployment of BIP113. It has already been deployed.
- The doc comment for BLOCK_DOWNLOAD_WINDOW wasn't updated since pruning was introduced, so it still refers to pruning as something that might happen in the future. A larger BLOCK_DOWNLOAD_WINDOW window would now, indeed, make pruning harder.
Tree-SHA512: ff86ff02c993e8317b9a0decfe5f5b6aae77b7d50e2b253ed73eb553348142bfc30cfeda15fae91907bab8f920e0ea7c52714f4cc7f33a9d6a777f708e2c99ba
This commit is contained in:
parent
45d1923490
commit
218f65d208
@ -254,7 +254,7 @@ bool CheckFinalTx(const CTransaction &tx, int flags)
|
||||
// IsFinalTx() with one more than chainActive.Height().
|
||||
const int nBlockHeight = chainActive.Height() + 1;
|
||||
|
||||
// BIP113 will require that time-locked transactions have nLockTime set to
|
||||
// BIP113 requires that time-locked transactions have nLockTime set to
|
||||
// less than the median time of the previous block they're contained in.
|
||||
// When the next block is created its previous block will be the current
|
||||
// chain tip, so we use that to calculate the median time passed to
|
||||
|
@ -96,8 +96,8 @@ static const int MAX_CMPCTBLOCK_DEPTH = 5;
|
||||
static const int MAX_BLOCKTXN_DEPTH = 10;
|
||||
/** Size of the "block download window": how far ahead of our current height do we fetch?
|
||||
* Larger windows tolerate larger download speed differences between peer, but increase the potential
|
||||
* degree of disordering of blocks on disk (which make reindexing and in the future perhaps pruning
|
||||
* harder). We'll probably want to make this a per-peer adaptive value at some point. */
|
||||
* degree of disordering of blocks on disk (which make reindexing and pruning harder). We'll probably
|
||||
* want to make this a per-peer adaptive value at some point. */
|
||||
static const unsigned int BLOCK_DOWNLOAD_WINDOW = 1024;
|
||||
/** Time to wait (in seconds) between writing blocks/block index to disk. */
|
||||
static const unsigned int DATABASE_WRITE_INTERVAL = 60 * 60;
|
||||
|
Loading…
Reference in New Issue
Block a user