mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-05 10:17:30 -05:00
d5931f3676
fa7e311e16
[doc] rpcwallet: Only fail rescan when blocks have been pruned (MarcoFalke)aaaa57c2aa
scripted-diff: Bump copyright headers in wallet (MarcoFalke)faf3729242
wallet: Only fail rescan when blocks have actually been pruned (MarcoFalke) Pull request description: This brings the behaviour of the import* calls closer to importmulti. After this change, the difference between importmulti and the other import* calls is * that in importmulti you can "opt-out" of scanning early blocks by setting a later timestamp. * that in importmulti the wallet will successfully import the data, but fail to rescan. Whereas in the other calls, the wallet will abort before importing the data. ACKs for commit fa7e31: promag: utACKfa7e311e16
. jnewbery: utACKfa7e311e16
Tree-SHA512: a57d52ffea94b64e0eb9b5d3a7a63031325833908297dd14eb0c5251ffea3b2113b131003f1db4e9599e014369165a57f107a7150bb65e4c791e5fe742f33cb8
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
// Copyright (c) 2016-2019 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_WALLET_RPCWALLET_H
|
|
#define BITCOIN_WALLET_RPCWALLET_H
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class CRPCTable;
|
|
class CWallet;
|
|
class JSONRPCRequest;
|
|
class UniValue;
|
|
struct PartiallySignedTransaction;
|
|
class CTransaction;
|
|
|
|
namespace interfaces {
|
|
class Chain;
|
|
class Handler;
|
|
}
|
|
|
|
void RegisterWalletRPCCommands(interfaces::Chain& chain, std::vector<std::unique_ptr<interfaces::Handler>>& handlers);
|
|
|
|
/**
|
|
* Figures out what wallet, if any, to use for a JSONRPCRequest.
|
|
*
|
|
* @param[in] request JSONRPCRequest that wishes to access a wallet
|
|
* @return nullptr if no wallet should be used, or a pointer to the CWallet
|
|
*/
|
|
std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& request);
|
|
|
|
std::string HelpRequiringPassphrase(const CWallet*);
|
|
void EnsureWalletIsUnlocked(const CWallet*);
|
|
bool EnsureWalletIsAvailable(const CWallet*, bool avoidException);
|
|
|
|
UniValue getaddressinfo(const JSONRPCRequest& request);
|
|
UniValue signrawtransactionwithwallet(const JSONRPCRequest& request);
|
|
#endif //BITCOIN_WALLET_RPCWALLET_H
|