mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
refactor: Change createWallet, fillPSBT argument order
Move output arguments after input arguments for consistency with other methods, and to work more easily with IPC framework in #10102
This commit is contained in:
@@ -262,12 +262,11 @@ public:
|
||||
{
|
||||
return MakeWallet(LoadWallet(*m_context.chain, name, error, warnings));
|
||||
}
|
||||
WalletCreationStatus createWallet(const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, std::string& error, std::vector<std::string>& warnings, std::unique_ptr<Wallet>& result) override
|
||||
std::unique_ptr<Wallet> createWallet(const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, std::string& error, std::vector<std::string>& warnings, WalletCreationStatus& status) override
|
||||
{
|
||||
std::shared_ptr<CWallet> wallet;
|
||||
WalletCreationStatus status = CreateWallet(*m_context.chain, passphrase, wallet_creation_flags, name, error, warnings, wallet);
|
||||
result = MakeWallet(wallet);
|
||||
return status;
|
||||
status = CreateWallet(*m_context.chain, passphrase, wallet_creation_flags, name, error, warnings, wallet);
|
||||
return MakeWallet(wallet);
|
||||
}
|
||||
std::unique_ptr<Handler> handleInitMessage(InitMessageFn fn) override
|
||||
{
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
virtual std::unique_ptr<Wallet> loadWallet(const std::string& name, std::string& error, std::vector<std::string>& warnings) = 0;
|
||||
|
||||
//! Create a wallet from file
|
||||
virtual WalletCreationStatus createWallet(const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, std::string& error, std::vector<std::string>& warnings, std::unique_ptr<Wallet>& result) = 0;
|
||||
virtual std::unique_ptr<Wallet> createWallet(const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, std::string& error, std::vector<std::string>& warnings, WalletCreationStatus& status) = 0;
|
||||
|
||||
//! Register handler for init messages.
|
||||
using InitMessageFn = std::function<void(const std::string& message)>;
|
||||
|
||||
@@ -352,11 +352,11 @@ public:
|
||||
}
|
||||
return {};
|
||||
}
|
||||
TransactionError fillPSBT(PartiallySignedTransaction& psbtx,
|
||||
bool& complete,
|
||||
int sighash_type = 1 /* SIGHASH_ALL */,
|
||||
bool sign = true,
|
||||
bool bip32derivs = false) const override
|
||||
TransactionError fillPSBT(int sighash_type,
|
||||
bool sign,
|
||||
bool bip32derivs,
|
||||
PartiallySignedTransaction& psbtx,
|
||||
bool& complete) override
|
||||
{
|
||||
return m_wallet->FillPSBT(psbtx, complete, sighash_type, sign, bip32derivs);
|
||||
}
|
||||
|
||||
@@ -193,11 +193,11 @@ public:
|
||||
int& num_blocks) = 0;
|
||||
|
||||
//! Fill PSBT.
|
||||
virtual TransactionError fillPSBT(PartiallySignedTransaction& psbtx,
|
||||
bool& complete,
|
||||
int sighash_type = 1 /* SIGHASH_ALL */,
|
||||
bool sign = true,
|
||||
bool bip32derivs = false) const = 0;
|
||||
virtual TransactionError fillPSBT(int sighash_type,
|
||||
bool sign,
|
||||
bool bip32derivs,
|
||||
PartiallySignedTransaction& psbtx,
|
||||
bool& complete) = 0;
|
||||
|
||||
//! Get balances.
|
||||
virtual WalletBalances getBalances() = 0;
|
||||
|
||||
Reference in New Issue
Block a user