mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
remove unnecessary casts and use braced initialization
This commit is contained in:
parent
6acda4b00b
commit
b01784f027
1 changed files with 3 additions and 3 deletions
|
@ -357,7 +357,7 @@ void CChainState::MaybeUpdateMempoolForReorg(
|
||||||
AssertLockHeld(::cs_main);
|
AssertLockHeld(::cs_main);
|
||||||
const CTransaction& tx = it->GetTx();
|
const CTransaction& tx = it->GetTx();
|
||||||
LockPoints lp = it->GetLockPoints();
|
LockPoints lp = it->GetLockPoints();
|
||||||
bool validLP = TestLockPointValidity(m_chain, &lp);
|
const bool validLP{TestLockPointValidity(m_chain, &lp)};
|
||||||
CCoinsViewMemPool view_mempool(&CoinsTip(), *m_mempool);
|
CCoinsViewMemPool view_mempool(&CoinsTip(), *m_mempool);
|
||||||
if (!CheckFinalTx(m_chain.Tip(), tx, flags)
|
if (!CheckFinalTx(m_chain.Tip(), tx, flags)
|
||||||
|| !CheckSequenceLocks(m_chain.Tip(), view_mempool, tx, flags, &lp, validLP)) {
|
|| !CheckSequenceLocks(m_chain.Tip(), view_mempool, tx, flags, &lp, validLP)) {
|
||||||
|
@ -371,8 +371,8 @@ void CChainState::MaybeUpdateMempoolForReorg(
|
||||||
continue;
|
continue;
|
||||||
const Coin &coin = CoinsTip().AccessCoin(txin.prevout);
|
const Coin &coin = CoinsTip().AccessCoin(txin.prevout);
|
||||||
assert(!coin.IsSpent());
|
assert(!coin.IsSpent());
|
||||||
unsigned int nMemPoolHeight = m_chain.Tip()->nHeight + 1;
|
const auto mempool_spend_height{m_chain.Tip()->nHeight + 1};
|
||||||
if (coin.IsSpent() || (coin.IsCoinBase() && ((signed long)nMemPoolHeight) - coin.nHeight < COINBASE_MATURITY)) {
|
if (coin.IsSpent() || (coin.IsCoinBase() && mempool_spend_height - coin.nHeight < COINBASE_MATURITY)) {
|
||||||
should_remove = true;
|
should_remove = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue