Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 426 Lines • ▼ Show 20 Lines | if (merkleBlock.txn.ExtractMatches(vMatch, vIndex) == | ||||
} | } | ||||
txnIndex = vIndex[it - vMatch.begin()]; | txnIndex = vIndex[it - vMatch.begin()]; | ||||
} else { | } else { | ||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | ||||
"Something wrong with merkleblock"); | "Something wrong with merkleblock"); | ||||
} | } | ||||
wtx.nIndex = txnIndex; | wtx.SetConf(CWalletTx::Status::CONFIRMED, merkleBlock.header.GetHash(), | ||||
wtx.hashBlock = merkleBlock.header.GetHash(); | txnIndex); | ||||
auto locked_chain = pwallet->chain().lock(); | auto locked_chain = pwallet->chain().lock(); | ||||
LOCK(pwallet->cs_wallet); | LOCK(pwallet->cs_wallet); | ||||
if (pwallet->IsMine(*wtx.tx)) { | if (pwallet->IsMine(*wtx.tx)) { | ||||
pwallet->AddToWallet(wtx, false); | pwallet->AddToWallet(wtx, false); | ||||
return NullUniValue; | return NullUniValue; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,355 Lines • Show Last 20 Lines |