64 for (
const auto& txin : wtx.
tx->vin) {
70 for (
const auto& txout : wtx.
tx->vout) {
88WalletTxStatus MakeWalletTxStatus(
const CWallet& wallet,
const CWalletTx& wtx)
93 WalletTxStatus result;
97 std::numeric_limits<int>::max();
110WalletTxOut MakeWalletTxOut(
const CWallet& wallet,
116 result.
txout = wtx.
tx->vout[n];
123WalletTxOut MakeWalletTxOut(
const CWallet& wallet,
127 result.
txout = output.txout;
128 result.
time = output.time;
134class WalletImpl :
public Wallet
137 explicit WalletImpl(WalletContext& context,
const std::shared_ptr<CWallet>& wallet) : m_context(context), m_wallet(wallet) {}
139 bool encryptWallet(
const SecureString& wallet_passphrase)
override
141 return m_wallet->EncryptWallet(wallet_passphrase);
143 bool isCrypted()
override {
return m_wallet->HasEncryptionKeys(); }
144 bool lock()
override {
return m_wallet->Lock(); }
145 bool unlock(
const SecureString& wallet_passphrase)
override {
return m_wallet->Unlock(wallet_passphrase); }
146 bool isLocked()
override {
return m_wallet->IsLocked(); }
147 bool changeWalletPassphrase(
const SecureString& old_wallet_passphrase,
150 return m_wallet->ChangeWalletPassphrase(old_wallet_passphrase, new_wallet_passphrase);
152 void abortRescan()
override { m_wallet->AbortRescan(); }
153 bool backupWallet(
const std::string& filename)
override {
return m_wallet->BackupWallet(filename); }
154 std::string getWalletName()
override {
return m_wallet->GetName(); }
157 LOCK(m_wallet->cs_wallet);
158 return m_wallet->GetNewDestination(type, label);
160 bool getPubKey(
const CScript& script,
const CKeyID& address, CPubKey& pub_key)
override
162 std::unique_ptr<SigningProvider> provider = m_wallet->GetSolvingProvider(script);
164 return provider->GetPubKey(address, pub_key);
168 SigningResult signMessage(
const std::string& message,
const PKHash& pkhash, std::string& str_sig)
override
170 return m_wallet->SignMessage(message, pkhash, str_sig);
174 LOCK(m_wallet->cs_wallet);
175 return m_wallet->IsMine(dest);
177 bool setAddressBook(
const CTxDestination& dest,
const std::string&
name,
const std::optional<AddressPurpose>& purpose)
override
179 return m_wallet->SetAddressBook(dest,
name, purpose);
183 return m_wallet->DelAddressBook(dest);
189 LOCK(m_wallet->cs_wallet);
190 const auto& entry = m_wallet->FindAddressBookEntry(dest,
false);
191 if (!entry)
return false;
193 *
name = entry->GetLabel();
201 std::vector<WalletAddress> getAddresses()
override
203 LOCK(m_wallet->cs_wallet);
204 std::vector<WalletAddress> result;
205 m_wallet->ForEachAddrBookEntry([&](
const CTxDestination& dest,
const std::string& label,
bool is_change,
const std::optional<AddressPurpose>& purpose)
EXCLUSIVE_LOCKS_REQUIRED(m_wallet->cs_wallet) {
206 if (is_change) return;
207 bool is_mine = m_wallet->IsMine(dest);
209 result.emplace_back(dest, is_mine, purpose.value_or(is_mine ? AddressPurpose::RECEIVE : AddressPurpose::SEND), label);
213 std::vector<std::string> getAddressReceiveRequests()
override {
214 LOCK(m_wallet->cs_wallet);
215 return m_wallet->GetAddressReceiveRequests();
217 bool setAddressReceiveRequest(
const CTxDestination& dest,
const std::string&
id,
const std::string& value)
override {
230 LOCK(m_wallet->cs_wallet);
231 WalletBatch batch{m_wallet->GetDatabase()};
232 return value.empty() ? m_wallet->EraseAddressReceiveRequest(batch, dest,
id)
233 : m_wallet->SetAddressReceiveRequest(batch, dest,
id, value);
235 util::Result<void> displayAddress(
const CTxDestination& dest)
override
237 LOCK(m_wallet->cs_wallet);
238 return m_wallet->DisplayAddress(dest);
240 bool lockCoin(
const COutPoint& output,
const bool write_to_db)
override
242 LOCK(m_wallet->cs_wallet);
243 return m_wallet->LockCoin(output, write_to_db);
245 bool unlockCoin(
const COutPoint& output)
override
247 LOCK(m_wallet->cs_wallet);
248 return m_wallet->UnlockCoin(output);
250 bool isLockedCoin(
const COutPoint& output)
override
252 LOCK(m_wallet->cs_wallet);
253 return m_wallet->IsLockedCoin(output);
255 void listLockedCoins(std::vector<COutPoint>& outputs)
override
257 LOCK(m_wallet->cs_wallet);
258 return m_wallet->ListLockedCoins(outputs);
260 util::Result<wallet::CreatedTransactionResult> createTransaction(
const std::vector<CRecipient>& recipients,
261 const CCoinControl& coin_control,
263 std::optional<unsigned int> change_pos)
override
265 LOCK(m_wallet->cs_wallet);
272 LOCK(m_wallet->cs_wallet);
273 m_wallet->CommitTransaction(std::move(tx), std::move(value_map), std::move(order_form));
275 bool transactionCanBeAbandoned(
const Txid& txid)
override {
return m_wallet->TransactionCanBeAbandoned(txid); }
276 bool abandonTransaction(
const Txid& txid)
override
278 LOCK(m_wallet->cs_wallet);
279 return m_wallet->AbandonTransaction(txid);
281 bool transactionCanBeBumped(
const Txid& txid)
override
285 bool createBumpTransaction(
const Txid& txid,
286 const CCoinControl& coin_control,
287 std::vector<bilingual_str>& errors,
290 CMutableTransaction& mtx)
override
292 std::vector<CTxOut> outputs;
296 bool commitBumpTransaction(
const Txid& txid,
297 CMutableTransaction&& mtx,
298 std::vector<bilingual_str>& errors,
299 Txid& bumped_txid)
override
306 LOCK(m_wallet->cs_wallet);
307 auto mi = m_wallet->mapWallet.find(txid);
308 if (mi != m_wallet->mapWallet.end()) {
309 return mi->second.tx;
313 WalletTx getWalletTx(
const Txid& txid)
override
315 LOCK(m_wallet->cs_wallet);
316 auto mi = m_wallet->mapWallet.find(txid);
317 if (mi != m_wallet->mapWallet.end()) {
318 return MakeWalletTx(*m_wallet, mi->second);
322 std::set<WalletTx> getWalletTxs()
override
324 LOCK(m_wallet->cs_wallet);
325 std::set<WalletTx> result;
326 for (
const auto& entry : m_wallet->mapWallet) {
327 result.emplace(MakeWalletTx(*m_wallet, entry.second));
331 bool tryGetTxStatus(
const Txid& txid,
332 interfaces::WalletTxStatus& tx_status,
334 int64_t& block_time)
override
336 TRY_LOCK(m_wallet->cs_wallet, locked_wallet);
337 if (!locked_wallet) {
340 auto mi = m_wallet->mapWallet.find(txid);
341 if (mi == m_wallet->mapWallet.end()) {
344 num_blocks = m_wallet->GetLastBlockHeight();
346 CHECK_NONFATAL(m_wallet->chain().findBlock(m_wallet->GetLastBlockHash(), FoundBlock().time(block_time)));
347 tx_status = MakeWalletTxStatus(*m_wallet, mi->second);
350 WalletTx getWalletTxDetails(
const Txid& txid,
351 WalletTxStatus& tx_status,
354 int& num_blocks)
override
356 LOCK(m_wallet->cs_wallet);
357 auto mi = m_wallet->mapWallet.find(txid);
358 if (mi != m_wallet->mapWallet.end()) {
359 num_blocks = m_wallet->GetLastBlockHeight();
360 in_mempool = mi->second.InMempool();
361 order_form = mi->second.vOrderForm;
362 tx_status = MakeWalletTxStatus(*m_wallet, mi->second);
363 return MakeWalletTx(*m_wallet, mi->second);
367 std::optional<PSBTError> fillPSBT(std::optional<int> sighash_type,
371 PartiallySignedTransaction& psbtx,
372 bool& complete)
override
374 return m_wallet->FillPSBT(psbtx, complete, sighash_type,
sign, bip32derivs, n_signed);
376 WalletBalances getBalances()
override
379 WalletBalances result;
380 result.
balance = bal.m_mine_trusted;
385 bool tryGetBalances(WalletBalances& balances, uint256& block_hash)
override
387 TRY_LOCK(m_wallet->cs_wallet, locked_wallet);
388 if (!locked_wallet) {
391 block_hash = m_wallet->GetLastBlockHash();
392 balances = getBalances();
396 CAmount getAvailableBalance(
const CCoinControl& coin_control)
override
398 LOCK(m_wallet->cs_wallet);
402 FastRandomContext rng{};
403 CoinSelectionParams params(rng);
406 total_amount += res->GetTotalAmount();
417 bool txinIsMine(
const CTxIn& txin)
override
419 LOCK(m_wallet->cs_wallet);
422 bool txoutIsMine(
const CTxOut& txout)
override
424 LOCK(m_wallet->cs_wallet);
425 return m_wallet->IsMine(txout);
427 CAmount getDebit(
const CTxIn& txin)
override
429 LOCK(m_wallet->cs_wallet);
430 return m_wallet->GetDebit(txin);
432 CAmount getCredit(
const CTxOut& txout)
override
434 LOCK(m_wallet->cs_wallet);
437 CoinsList listCoins()
override
439 LOCK(m_wallet->cs_wallet);
441 for (
const auto& entry :
ListCoins(*m_wallet)) {
442 auto&
group = result[entry.first];
443 for (
const auto& coin : entry.second) {
444 group.emplace_back(coin.outpoint,
445 MakeWalletTxOut(*m_wallet, coin));
450 std::vector<WalletTxOut> getCoins(
const std::vector<COutPoint>& outputs)
override
452 LOCK(m_wallet->cs_wallet);
453 std::vector<WalletTxOut> result;
454 result.reserve(outputs.size());
455 for (
const auto& output : outputs) {
456 result.emplace_back();
457 auto it = m_wallet->mapWallet.find(output.
hash);
458 if (it != m_wallet->mapWallet.end()) {
459 int depth = m_wallet->GetTxDepthInMainChain(it->second);
461 result.back() = MakeWalletTxOut(*m_wallet, it->second, output.
n, depth);
467 CAmount getRequiredFee(
unsigned int tx_bytes)
override {
return GetRequiredFee(*m_wallet, tx_bytes); }
468 CAmount getMinimumFee(
unsigned int tx_bytes,
469 const CCoinControl& coin_control,
470 int* returned_target,
473 FeeCalculation fee_calc;
475 result =
GetMinimumFee(*m_wallet, tx_bytes, coin_control, &fee_calc);
477 if (reason) *reason = fee_calc.
reason;
480 unsigned int getConfirmTarget()
override {
return m_wallet->m_confirm_target; }
481 bool hdEnabled()
override {
return m_wallet->IsHDEnabled(); }
482 bool canGetAddresses()
override {
return m_wallet->CanGetAddresses(); }
485 bool taprootEnabled()
override {
487 return spk_man !=
nullptr;
489 OutputType getDefaultAddressType()
override {
return m_wallet->m_default_address_type; }
490 CAmount getDefaultMaxTxFee()
override {
return m_wallet->m_default_max_tx_fee; }
491 void remove()
override
495 std::unique_ptr<Handler> handleUnload(UnloadFn fn)
override
499 std::unique_ptr<Handler> handleShowProgress(ShowProgressFn fn)
override
503 std::unique_ptr<Handler> handleStatusChanged(StatusChangedFn fn)
override
505 return MakeSignalHandler(m_wallet->NotifyStatusChanged.connect([fn](CWallet*) { fn(); }));
507 std::unique_ptr<Handler> handleAddressBookChanged(AddressBookChangedFn fn)
override
510 [fn](
const CTxDestination& address,
const std::string& label,
bool is_mine,
513 std::unique_ptr<Handler> handleTransactionChanged(TransactionChangedFn fn)
override
516 [fn](
const Txid& txid,
ChangeType status) { fn(txid, status); }));
518 std::unique_ptr<Handler> handleCanGetAddressesChanged(CanGetAddressesChangedFn fn)
override
522 CWallet* wallet()
override {
return m_wallet.get(); }
524 WalletContext& m_context;
525 std::shared_ptr<CWallet> m_wallet;
528class WalletLoaderImpl :
public WalletLoader
531 WalletLoaderImpl(Chain& chain, ArgsManager&
args)
533 m_context.
chain = &chain;
534 m_context.args = &
args;
536 ~WalletLoaderImpl()
override {
stop(); }
539 void registerRpcs()
override
542 m_rpc_commands.emplace_back(
command.category,
command.name, [
this, &
command](
const JSONRPCRequest& request, UniValue& result,
bool last_handler) {
543 JSONRPCRequest wallet_request = request;
544 wallet_request.context = &m_context;
545 return command.actor(wallet_request, result, last_handler);
547 m_rpc_handlers.emplace_back(m_context.chain->handleRpc(m_rpc_commands.back()));
551 bool load()
override {
return LoadWallets(m_context); }
552 void start(CScheduler& scheduler)
override
554 m_context.scheduler = &scheduler;
558 void setMockTime(int64_t time)
override {
return SetMockTime(time); }
559 void schedulerMockForward(std::chrono::seconds delta)
override {
Assert(m_context.scheduler)->MockForward(delta); }
562 util::Result<std::unique_ptr<Wallet>> createWallet(
const std::string&
name,
const SecureString& passphrase, uint64_t wallet_creation_flags, std::vector<bilingual_str>& warnings)
override
564 DatabaseOptions options;
575 return util::Error{error};
578 util::Result<std::unique_ptr<Wallet>> loadWallet(
const std::string&
name, std::vector<bilingual_str>& warnings)
override
580 DatabaseOptions options;
585 std::unique_ptr<Wallet> wallet{
MakeWallet(m_context,
LoadWallet(m_context,
name,
true, options, status, error, warnings))};
589 return util::Error{error};
592 util::Result<std::unique_ptr<Wallet>> restoreWallet(
const fs::path& backup_file,
const std::string& wallet_name, std::vector<bilingual_str>& warnings,
bool load_after_restore)
override
596 std::unique_ptr<Wallet> wallet{
MakeWallet(m_context,
RestoreWallet(m_context, backup_file, wallet_name,
true, status, error, warnings, load_after_restore))};
597 if (!error.
empty()) {
598 return util::Error{error};
602 util::Result<WalletMigrationResult> migrateWallet(
const std::string&
name,
const SecureString& passphrase)
override
606 WalletMigrationResult
out{
608 .watchonly_wallet_name = res->watchonly_wallet ? std::make_optional(res->watchonly_wallet->GetName()) : std::nullopt,
609 .solvables_wallet_name = res->solvables_wallet ? std::make_optional(res->solvables_wallet->GetName()) : std::nullopt,
610 .backup_path = res->backup_path,
614 bool isEncrypted(
const std::string& wallet_name)
override
617 auto it = std::find_if(wallets.begin(), wallets.end(), [&](std::shared_ptr<CWallet> w){ return w->GetName() == wallet_name; });
618 if (it != wallets.end())
return (*it)->HasEncryptionKeys();
621 DatabaseOptions options;
630 if (!db)
return false;
631 return WalletBatch(*db).IsEncrypted();
633 std::string getWalletDir()
override
637 std::vector<std::pair<std::string, std::string>> listWalletDir()
override
639 std::vector<std::pair<std::string, std::string>> paths;
641 paths.emplace_back(fs::PathToString(path), format);
645 std::vector<std::unique_ptr<Wallet>> getWallets()
override
647 std::vector<std::unique_ptr<Wallet>> wallets;
648 for (
const auto& wallet :
GetWallets(m_context)) {
649 wallets.emplace_back(
MakeWallet(m_context, wallet));
653 std::unique_ptr<Handler> handleLoadWallet(
LoadWalletFn fn)
override
657 WalletContext* context()
override {
return &m_context; }
659 WalletContext m_context;
660 const std::vector<std::string> m_wallet_filenames;
661 std::vector<std::unique_ptr<Handler>> m_rpc_handlers;
662 std::list<CRPCCommand> m_rpc_commands;
667namespace interfaces {
672 return std::make_unique<wallet::WalletLoaderImpl>(chain,
args);
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
Parse a scriptPubKey for the destination.
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
int64_t CAmount
Amount in satoshis (Can be negative).
#define CHECK_NONFATAL(condition)
Identity function.
#define Assert(val)
Identity function.
bool HasSelected() const
Returns true if there are pre-selected inputs.
bool m_allow_other_inputs
int GetTxDepthInMainChain(const CWalletTx &wtx) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
Return depth of transaction in blockchain: <0 : conflicts with a transaction this deep in the blockch...
interfaces::Chain & chain() const
Interface for accessing chain state.
int GetTxBlocksToMaturity(const CWalletTx &wtx) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
RecursiveMutex cs_wallet
Main wallet lock.
const Txid & GetHash() const LIFETIMEBOUND
mapValue_t mapValue
Key/value map with information about the transaction.
unsigned int nTimeReceived
time received by this node
int64_t GetTxTime() const
Interface for accessing a wallet.
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
A transaction with a bunch of additional info that only the owner cares about.
bool IsSpent(const COutPoint &outpoint) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
Outpoint is spent if any non-conflicted transaction spends it:
bool IsMine(const CTxDestination &dest) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
static int sign(const secp256k1_context *ctx, struct signer_secrets *signer_secrets, struct signer *signer, const secp256k1_musig_keyagg_cache *cache, const unsigned char *msg32, unsigned char *sig64)
std::map< std::string, std::string > WalletValueMap
std::vector< std::pair< std::string, std::string > > WalletOrderForm
std::unique_ptr< Handler > MakeSignalHandler(boost::signals2::connection connection)
Return handler wrapping a boost signal connection.
std::unique_ptr< Wallet > MakeWallet(wallet::WalletContext &context, const std::shared_ptr< wallet::CWallet > &wallet)
bilingual_str ErrorString(const Result< T > &result)
Result CreateRateBumpTransaction(CWallet &wallet, const Txid &txid, const CCoinControl &coin_control, std::vector< bilingual_str > &errors, CAmount &old_fee, CAmount &new_fee, CMutableTransaction &mtx, bool require_mine, const std::vector< CTxOut > &outputs, std::optional< uint32_t > original_change_index)
Create bumpfee transaction based on feerate estimates.
bool TransactionCanBeBumped(const CWallet &wallet, const Txid &txid)
Return whether transaction can be bumped.
bool SignTransaction(CWallet &wallet, CMutableTransaction &mtx)
Result CommitTransaction(CWallet &wallet, const Txid &txid, CMutableTransaction &&mtx, std::vector< bilingual_str > &errors, Txid &bumped_txid)
void StartWallets(WalletContext &context)
Complete startup of wallets.
bool OutputIsChange(const CWallet &wallet, const CTxOut &txout)
void ReadDatabaseArgs(const ArgsManager &args, DatabaseOptions &options)
Balance GetBalance(const CWallet &wallet, const int min_depth, bool avoid_reuse)
std::shared_ptr< CWallet > LoadWallet(WalletContext &context, const std::string &name, std::optional< bool > load_on_start, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings)
util::Result< CreatedTransactionResult > CreateTransaction(CWallet &wallet, const std::vector< CRecipient > &vecSend, std::optional< unsigned int > change_pos, const CCoinControl &coin_control, bool sign)
Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also cr...
std::vector< std::shared_ptr< CWallet > > GetWallets(WalletContext &context)
util::Result< CoinsResult > FetchSelectedInputs(const CWallet &wallet, const CCoinControl &coin_control, const CoinSelectionParams &coin_selection_params)
Fetch and validate coin control selected inputs.
bool CachedTxIsTrusted(const CWallet &wallet, const CWalletTx &wtx, std::set< Txid > &trusted_parents)
CAmount GetMinimumFee(const CWallet &wallet, unsigned int nTxBytes, const CCoinControl &coin_control, FeeCalculation *feeCalc)
Estimate the minimum fee considering user set parameters and the required fee.
bool VerifyWallets(WalletContext &context)
Responsible for reading and validating the -wallet arguments and verifying the wallet database.
std::unique_ptr< interfaces::Handler > HandleLoadWallet(WalletContext &context, LoadWalletFn load_wallet)
fs::path GetWalletDir()
Get the path of the wallet directory.
util::Result< MigrationResult > MigrateLegacyToDescriptor(const std::string &wallet_name, const SecureString &passphrase, WalletContext &context)
Do all steps to migrate a legacy wallet to a descriptor wallet.
std::unique_ptr< WalletDatabase > MakeWalletDatabase(const std::string &name, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error_string)
std::map< CTxDestination, std::vector< COutput > > ListCoins(const CWallet &wallet)
Return list of available coins and locked coins grouped by non-change output address.
CAmount CachedTxGetDebit(const CWallet &wallet, const CWalletTx &wtx, bool avoid_reuse)
std::shared_ptr< CWallet > RestoreWallet(WalletContext &context, const fs::path &backup_file, const std::string &wallet_name, std::optional< bool > load_on_start, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings, bool load_after_restore, bool allow_unnamed)
CAmount CachedTxGetChange(const CWallet &wallet, const CWalletTx &wtx)
CAmount CachedTxGetCredit(const CWallet &wallet, const CWalletTx &wtx, bool avoid_reuse)
AddressPurpose
Address purpose field that has been been stored with wallet sending and receiving addresses since BIP...
std::function< void(std::unique_ptr< interfaces::Wallet > wallet)> LoadWalletFn
void UnloadWallets(WalletContext &context)
std::shared_ptr< CWallet > CreateWallet(WalletContext &context, const std::string &name, std::optional< bool > load_on_start, DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings)
bool LoadWallets(WalletContext &context)
Load wallet databases.
@ WALLET_FLAG_EXTERNAL_SIGNER
Indicates that the wallet needs an external signer.
@ WALLET_FLAG_DISABLE_PRIVATE_KEYS
CAmount GetRequiredFee(const CWallet &wallet, unsigned int nTxBytes)
Return the minimum required absolute fee for this size based on the required fee rate.
std::span< const CRPCCommand > GetWalletRPCCommands()
bool InputIsMine(const CWallet &wallet, const CTxIn &txin)
CTxDestination getNewDestination(CWallet &w, OutputType output_type)
Returns a new destination, of an specific type, from the wallet.
CAmount OutputGetCredit(const CWallet &wallet, const CTxOut &txout)
std::vector< std::pair< fs::path, std::string > > ListDatabases(const fs::path &wallet_dir)
Recursively list database paths in directory.
bool RemoveWallet(WalletContext &context, const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start, std::vector< bilingual_str > &warnings)
CoinsResult AvailableCoins(const CWallet &wallet, const CCoinControl *coinControl, std::optional< CFeeRate > feerate, const CoinFilterParams ¶ms)
Populate the CoinsResult struct with vectors of available COutputs, organized by OutputType.
std::unique_ptr< Handler > MakeSignalHandler(boost::signals2::connection connection)
Return handler wrapping a boost signal connection.
std::shared_ptr< const CTransaction > CTransactionRef
static bool verify(const CScriptNum10 &bignum, const CScriptNum &scriptnum)
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
SecureString create_passphrase
std::optional< DatabaseFormat > require_format
Information about one wallet address.
Collection of wallet balances.
CAmount unconfirmed_balance
std::vector< bool > txin_is_mine
std::vector< CTxDestination > txout_address
std::vector< bool > txout_address_is_mine
std::vector< bool > txout_is_change
std::map< std::string, std::string > value_map
std::vector< bool > txout_is_mine
Wallet transaction output.
Updated transaction status.
unsigned int time_received
CAmount m_mine_trusted
Trusted, at depth=GetBalance.min_depth or more.
A UTXO under consideration for use in funding a new transaction.
CAmount GetTotalAmount() const
State of rejected transaction that conflicts with a confirmed block.
int conflicting_block_height
State of transaction confirmed in a block.
int confirmed_block_height
#define TRY_LOCK(cs, name)
#define AssertLockHeld(cs)
#define EXCLUSIVE_LOCKS_REQUIRED(...)
transaction_identifier< false > Txid
Txid commits to all transaction fields except the witness.
ChangeType
General change type (added, updated, removed).
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.