@@ -3088,8 +3088,8 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
3088
3088
// Remove orphan transactions with cs_main
3089
3089
{
3090
3090
LOCK (cs_main);
3091
- std::vector<uint256> vOrphanErase;
3092
3091
for (unsigned int i = 0 ; i < txChanged.size (); i++) {
3092
+ std::vector<uint256> vOrphanErase;
3093
3093
const CTransaction& tx = std::get<0 >(txChanged[i]);
3094
3094
// Which orphan pool entries must we evict?
3095
3095
for (size_t j = 0 ; j < tx.vin .size (); j++) {
@@ -3101,14 +3101,15 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
3101
3101
vOrphanErase.push_back (orphanHash);
3102
3102
}
3103
3103
}
3104
- }
3105
- // Erase orphan transactions include or precluded by this block
3106
- if (vOrphanErase.size ()) {
3107
- int nErased = 0 ;
3108
- BOOST_FOREACH (uint256 &orphanHash, vOrphanErase) {
3109
- nErased += EraseOrphanTx (orphanHash);
3104
+
3105
+ // Erase orphan transactions include or precluded by this block
3106
+ if (vOrphanErase.size ()) {
3107
+ int nErased = 0 ;
3108
+ BOOST_FOREACH (uint256 &orphanHash, vOrphanErase) {
3109
+ nErased += EraseOrphanTx (orphanHash);
3110
+ }
3111
+ LogPrint (" mempool" , " Erased %d orphan tx included or conflicted by block\n " , nErased);
3110
3112
}
3111
- LogPrint (" mempool" , " Erased %d orphan tx included or conflicted by block\n " , nErased);
3112
3113
}
3113
3114
}
3114
3115
0 commit comments