Fix reserve key wallet pointer ownership

This commit is contained in:
Krystie
2026-05-10 02:40:47 -07:00
parent e6d8c6dbfe
commit ce8be45ea5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -818,7 +818,7 @@ Value sendmany(const Array& params, bool fHelp)
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
// Send
CReserveKey keyChange(pwalletMain);
CReserveKey keyChange(pwalletMain.get());
int64_t nFeeRequired = 0;
bool fCreated = pwalletMain->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired);
if (!fCreated)
+1 -1
View File
@@ -46,7 +46,7 @@ struct {
// NOTE: These tests rely on CreateNewBlock doing its own self-validation!
BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
{
CReserveKey reservekey(pwalletMain);
CReserveKey reservekey(pwalletMain.get());
CBlock *pblock;
CTransaction tx;
CScript script;