Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 422 Lines • ▼ Show 20 Lines | UniValue importprunedfunds(const Config &config, | ||||
// Search partial merkle tree in proof for our transaction and index in | // Search partial merkle tree in proof for our transaction and index in | ||||
// valid block | // valid block | ||||
std::vector<uint256> vMatch; | std::vector<uint256> vMatch; | ||||
std::vector<size_t> vIndex; | std::vector<size_t> vIndex; | ||||
size_t txnIndex = 0; | size_t txnIndex = 0; | ||||
if (merkleBlock.txn.ExtractMatches(vMatch, vIndex) == | if (merkleBlock.txn.ExtractMatches(vMatch, vIndex) == | ||||
merkleBlock.header.hashMerkleRoot) { | merkleBlock.header.hashMerkleRoot) { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
const CBlockIndex *pindex = | const CBlockIndex *pindex = | ||||
LookupBlockIndex(merkleBlock.header.GetHash()); | LookupBlockIndex(merkleBlock.header.GetHash()); | ||||
if (!pindex || !chainActive.Contains(pindex)) { | if (!pindex || !chainActive.Contains(pindex)) { | ||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | ||||
"Block not found in chain"); | "Block not found in chain"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,088 Lines • Show Last 20 Lines |