mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-12 08:08:25 +00:00
Only send reorged txn to mempool after checkpoint
This commit is contained in:
parent
038784b979
commit
8259c57321
@ -1704,9 +1704,11 @@ bool SetBestChain(CBlockIndex* pindexNew)
|
|||||||
if (!viewTemp.Flush())
|
if (!viewTemp.Flush())
|
||||||
return error("SetBestBlock() : Cache flush failed after disconnect");
|
return error("SetBestBlock() : Cache flush failed after disconnect");
|
||||||
|
|
||||||
// Queue memory transactions to resurrect
|
// Queue memory transactions to resurrect.
|
||||||
|
// We only do this for blocks after the last checkpoint (reorganisation before that
|
||||||
|
// point should only happen with -reindex/-loadblock, or a misbehaving peer.
|
||||||
BOOST_FOREACH(const CTransaction& tx, block.vtx)
|
BOOST_FOREACH(const CTransaction& tx, block.vtx)
|
||||||
if (!tx.IsCoinBase())
|
if (!tx.IsCoinBase() && pindex->nHeight > Checkpoints::GetTotalBlocksEstimate())
|
||||||
vResurrect.push_back(tx);
|
vResurrect.push_back(tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user