mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
[Wallet] Improve ReorderTransactions(..)
This commit is contained in:
parent
7accb7dbad
commit
da2ede2aa6
@ -278,8 +278,12 @@ CWalletDB::ReorderTransactions(CWallet* pwallet)
|
||||
nOrderPos = nOrderPosNext++;
|
||||
nOrderPosOffsets.push_back(nOrderPos);
|
||||
|
||||
if (pacentry)
|
||||
// Have to write accounting regardless, since we don't keep it in memory
|
||||
if (pwtx)
|
||||
{
|
||||
if (!WriteTx(pwtx->GetHash(), *pwtx))
|
||||
return DB_LOAD_FAIL;
|
||||
}
|
||||
else
|
||||
if (!WriteAccountingEntry(pacentry->nEntryNo, *pacentry))
|
||||
return DB_LOAD_FAIL;
|
||||
}
|
||||
@ -308,6 +312,7 @@ CWalletDB::ReorderTransactions(CWallet* pwallet)
|
||||
return DB_LOAD_FAIL;
|
||||
}
|
||||
}
|
||||
WriteOrderPosNext(nOrderPosNext);
|
||||
|
||||
return DB_LOAD_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user