mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-10 23:07:52 +00:00
fix EraseTxIndex usage
This commit is contained in:
parent
6e1c42e963
commit
84f796be7f
@ -1077,10 +1077,10 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
|
||||
|
||||
// undo transactions in reverse order
|
||||
// [MF] just remove from txIndex, no more coins
|
||||
for (int i = block.vtx.size() - 1; i >= 0; i--) {
|
||||
for (int i = block.vtx.size() - 1; i >= 1; i--) {
|
||||
const CTransaction &tx = block.vtx[i];
|
||||
|
||||
if( i > 0 && pblocktree->EraseTxIndex(tx.GetUsernameHash()) ) {
|
||||
if( !pblocktree->EraseTxIndex(tx.GetUsernameHash()) ) {
|
||||
fClean = fClean && error("DisconnectBlock() : error erasing txIndex");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user