mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
Prevent RPC 'move' from deadlocking
It seemed to create two CWalletDB objects that both grab the database lock.
This commit is contained in:
committed by
Luke Dashjr
parent
acbdc05560
commit
2a333587bd
@@ -573,7 +573,7 @@ Value movecmd(const Array& params, bool fHelp)
|
||||
|
||||
// Debit
|
||||
CAccountingEntry debit;
|
||||
debit.nOrderPos = pwalletMain->IncOrderPosNext();
|
||||
debit.nOrderPos = pwalletMain->IncOrderPosNext(&walletdb);
|
||||
debit.strAccount = strFrom;
|
||||
debit.nCreditDebit = -nAmount;
|
||||
debit.nTime = nNow;
|
||||
@@ -583,7 +583,7 @@ Value movecmd(const Array& params, bool fHelp)
|
||||
|
||||
// Credit
|
||||
CAccountingEntry credit;
|
||||
credit.nOrderPos = pwalletMain->IncOrderPosNext();
|
||||
credit.nOrderPos = pwalletMain->IncOrderPosNext(&walletdb);
|
||||
credit.strAccount = strTo;
|
||||
credit.nCreditDebit = nAmount;
|
||||
credit.nTime = nNow;
|
||||
|
||||
Reference in New Issue
Block a user