From 616324d032812b49f50a813ae97a817f46f611a3 Mon Sep 17 00:00:00 2001 From: Alrighttt Date: Thu, 11 Jul 2019 03:12:28 +0200 Subject: [PATCH] remove extra var --- src/wallet/rpcwallet.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 44d52597d..5071f7935 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -8071,7 +8071,7 @@ void RegisterWalletRPCCommands(CRPCTable &tableRPC) UniValue opreturn_burn(const UniValue& params, bool fHelp) { - std::vector vHexStr; CScript opret; int32_t txfee = 10000;CPubKey pubkey; + std::vector vHexStr; CScript opret; int32_t txfee = 10000;CPubKey myPubkey; if (fHelp || (params.size() < 2) || (params.size() > 4) ) { throw runtime_error( @@ -8110,12 +8110,11 @@ UniValue opreturn_burn(const UniValue& params, bool fHelp) throw JSONRPCError(RPC_TYPE_ERROR, "wallet is locked or unavailable."); EnsureWalletIsUnlocked(); CReserveKey reservekey(pwalletMain); - if (!reservekey.GetReservedKey(pubkey)) + if (!reservekey.GetReservedKey(myPubkey)) { throw JSONRPCError(RPC_TYPE_ERROR, "keypool error."); } - CPubKey myPubkey = pubkey; CMutableTransaction mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), komodo_nextheight()); int64_t normalInputs = AddNormalinputs(mtx, myPubkey, nAmount+txfee, 60);