Permalink
Browse files

Only send reorged txn to mempool after checkpoint

  • Loading branch information...
Tranz5 committed Aug 21, 2014
1 parent 70ecab0 commit c2194fb604b64adec96e7bb129afd974cf5a7656
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/main.cpp
@@ -1777,8 +1777,10 @@ bool static Reorganize(CTxDB& txdb, CBlockIndex* pindexNew)
return error("Reorganize() : DisconnectBlock %s failed", pindex->GetBlockHash().ToString().substr(0,20).c_str());
// 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)
if (!(tx.IsCoinBase() || tx.IsCoinStake()))
if (!(tx.IsCoinBase() || tx.IsCoinStake()) && pindex->nHeight > Checkpoints::GetTotalBlocksEstimate())
vResurrect.push_back(tx);
}

0 comments on commit c2194fb

Please sign in to comment.