mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
refactor: replace pointers by references within tx_verify.{h,cpp}
affects "prevHeights" parameter of the functions - CalculateSequenceLocks() - SequenceLocks()
This commit is contained in:
@@ -295,7 +295,7 @@ bool CheckSequenceLocks(const CTxMemPool& pool, const CTransaction& tx, int flag
|
||||
prevheights[txinIndex] = coin.nHeight;
|
||||
}
|
||||
}
|
||||
lockPair = CalculateSequenceLocks(tx, flags, &prevheights, index);
|
||||
lockPair = CalculateSequenceLocks(tx, flags, prevheights, index);
|
||||
if (lp) {
|
||||
lp->height = lockPair.first;
|
||||
lp->time = lockPair.second;
|
||||
@@ -2147,7 +2147,7 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state,
|
||||
prevheights[j] = view.AccessCoin(tx.vin[j].prevout).nHeight;
|
||||
}
|
||||
|
||||
if (!SequenceLocks(tx, nLockTimeFlags, &prevheights, *pindex)) {
|
||||
if (!SequenceLocks(tx, nLockTimeFlags, prevheights, *pindex)) {
|
||||
LogPrintf("ERROR: %s: contains a non-BIP68-final transaction\n", __func__);
|
||||
return state.Invalid(BlockValidationResult::BLOCK_CONSENSUS, "bad-txns-nonfinal");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user