Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "base58.h" | #include "base58.h" | ||||
#include "chain.h" | #include "chain.h" | ||||
#include "config.h" | #include "config.h" | ||||
#include "core_io.h" | #include "core_io.h" | ||||
#include "dstencode.h" | #include "dstencode.h" | ||||
#include "init.h" | #include "init.h" | ||||
#include "merkleblock.h" | #include "merkleblock.h" | ||||
#include "rpc/safemode.h" | |||||
#include "rpc/server.h" | #include "rpc/server.h" | ||||
#include "rpcwallet.h" | #include "rpcwallet.h" | ||||
#include "script/script.h" | #include "script/script.h" | ||||
#include "script/standard.h" | #include "script/standard.h" | ||||
#include "sync.h" | #include "sync.h" | ||||
#include "util.h" | #include "util.h" | ||||
#include "utiltime.h" | #include "utiltime.h" | ||||
#include "validation.h" | #include "validation.h" | ||||
▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 0) { | ||||
"\nImport a private key\n" + | "\nImport a private key\n" + | ||||
HelpExampleCli("importprivkey", "\"mykey\"") + | HelpExampleCli("importprivkey", "\"mykey\"") + | ||||
"\nAbort the running wallet rescan\n" + | "\nAbort the running wallet rescan\n" + | ||||
HelpExampleCli("abortrescan", "") + | HelpExampleCli("abortrescan", "") + | ||||
"\nAs a JSON-RPC call\n" + | "\nAs a JSON-RPC call\n" + | ||||
HelpExampleRpc("abortrescan", "")); | HelpExampleRpc("abortrescan", "")); | ||||
} | } | ||||
ObserveSafeMode(); | |||||
if (!pwallet->IsScanning() || pwallet->IsAbortingRescan()) { | if (!pwallet->IsScanning() || pwallet->IsAbortingRescan()) { | ||||
return false; | return false; | ||||
} | } | ||||
pwallet->AbortRescan(); | pwallet->AbortRescan(); | ||||
return true; | return true; | ||||
} | } | ||||
void ImportAddress(CWallet *, const CTxDestination &dest, | void ImportAddress(CWallet *, const CTxDestination &dest, | ||||
▲ Show 20 Lines • Show All 1,236 Lines • Show Last 20 Lines |