Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 1,933 Lines • ▼ Show 20 Lines | static UniValue listsinceblock(const Config &config, | ||||
// Make sure the results are valid at least up to the most recent block | // Make sure the results are valid at least up to the most recent block | ||||
// the user could have gotten from another RPC command prior to now | // the user could have gotten from another RPC command prior to now | ||||
pwallet->BlockUntilSyncedToCurrentChain(); | pwallet->BlockUntilSyncedToCurrentChain(); | ||||
auto locked_chain = pwallet->chain().lock(); | auto locked_chain = pwallet->chain().lock(); | ||||
LOCK(pwallet->cs_wallet); | LOCK(pwallet->cs_wallet); | ||||
// Height of the specified block or the common ancestor, if the block | // The way the 'height' is initialized is just a workaround for the gcc bug | ||||
// provided was in a deactivated chain. | // #47679 since version 4.6.0. Height of the specified block or the common | ||||
Optional<int> height; | // ancestor, if the block provided was in a deactivated chain. | ||||
Optional<int> height = MakeOptional(false, int()); | |||||
// Height of the specified block, even if it's in a deactivated chain. | // Height of the specified block, even if it's in a deactivated chain. | ||||
Optional<int> altheight; | Optional<int> altheight; | ||||
int target_confirms = 1; | int target_confirms = 1; | ||||
isminefilter filter = ISMINE_SPENDABLE; | isminefilter filter = ISMINE_SPENDABLE; | ||||
BlockHash blockId; | BlockHash blockId; | ||||
if (!request.params[0].isNull() && !request.params[0].get_str().empty()) { | if (!request.params[0].isNull() && !request.params[0].get_str().empty()) { | ||||
blockId = BlockHash(ParseHashV(request.params[0], "blockhash")); | blockId = BlockHash(ParseHashV(request.params[0], "blockhash")); | ||||
▲ Show 20 Lines • Show All 3,026 Lines • Show Last 20 Lines |