![]() |
Bitcoin Core 32.99.0
P2P Digital Currency
|
| bool wallet::CWallet::AbandonTransaction | ( | const Txid & | hashTx | ) |
Definition at line 1298 of file wallet.cpp.
| bool wallet::CWallet::AbandonTransaction | ( | CWalletTx & | tx | ) |
Definition at line 797 of file wallet.cpp.
|
private |
| CWalletTx * wallet::CWallet::AddToWallet | ( | CTransactionRef | tx, |
| const TxState & | state, | ||
| const UpdateWalletTxFn & | update_wtx = nullptr, |
||
| bool | rescanning_old_block = false |
||
| ) |
Add the transaction to the wallet, wrapping it up inside a CWalletTx.
Definition at line 1042 of file wallet.cpp.
|
private |
Add a transaction to the wallet, or update it.
confirm.block_* should be set when the transaction was known to be included in a block. When block_hash.IsNull(), then wallet state is not updated in AddToWallet, but notifications happen and cached balances are marked dirty.
TODO: One exception to this is that the abandoned state is cleared under the assumption that any further notification of a transaction that was considered abandoned is an indication that it is not safe to be considered abandoned. Abandoned state should probably be more carefully tracked via different chain notifications or by checking mempool presence when necessary.
Should be called with rescanning_old_block set to true, if the transaction is not discovered in real time, but during a rescan of old blocks.
Definition at line 1199 of file wallet.cpp.
|
overridevirtual |
Reimplemented from interfaces::Chain::Notifications.
Definition at line 1534 of file wallet.cpp.
|
overridevirtual |
Reimplemented from interfaces::Chain::Notifications.
Definition at line 1563 of file wallet.cpp.
| bool wallet::CWallet::CanGetAddresses | ( | bool | internal = false | ) | const |
| bool wallet::CWallet::ChangeWalletPassphrase | ( | const SecureString & | strOldWalletPassphrase, |
| const SecureString & | strNewWalletPassphrase | ||
| ) |
| void wallet::CWallet::Close | ( | ) |
Close wallet database.
Definition at line 694 of file wallet.cpp.
|
static |
Definition at line 577 of file wallet.cpp.
|
static |
Definition at line 531 of file wallet.cpp.
| bool wallet::CWallet::EncryptWallet | ( | const SecureString & | strWalletPassphrase | ) |
Get wallet transactions that conflict with given transaction (spend same outputs)
Definition at line 659 of file wallet.cpp.
| CAmount wallet::CWallet::GetDebit | ( | const CTransaction & | tx | ) | const |
Returns amount of debit, i.e.
the amount leaving this wallet due to this input
Definition at line 1627 of file wallet.cpp.
|
staticprivate |
Definition at line 1883 of file wallet.cpp.
|
private |
Collects all wallet txs that differ from wtx only in their scriptSigs (i.e.
different tx id malleated variants) plus wtx itself. Sorted by the order in which they were inserted in the wallet (CWalletTx::nOrderPos)
Definition at line 699 of file wallet.cpp.
| uint64_t wallet::CWallet::GetWalletFlags | ( | ) | const |
Retrieve all of the wallet's flags.
Definition at line 1800 of file wallet.cpp.
Definition at line 507 of file wallet.cpp.
| bool wallet::CWallet::HasWalletSpend | ( | const CTransactionRef & | tx | ) | const |
Check if a given transaction has any of its outputs spent by another transaction in the wallet.
Definition at line 682 of file wallet.cpp.
| CWallet::SpendType wallet::CWallet::HowSpent | ( | const COutPoint & | outpoint | ) | const |
Definition at line 774 of file wallet.cpp.
| int64_t wallet::CWallet::IncOrderPosNext | ( | WalletBatch * | batch = nullptr | ) |
Increment the next transaction order id.
Definition at line 946 of file wallet.cpp.
| void wallet::CWallet::InitWalletFlags | ( | uint64_t | flags | ) |
overwrite all flags by the given uint64_t flags must be uninitialised (or 0) only known flags may be present
Definition at line 1784 of file wallet.cpp.
| bool wallet::CWallet::IsFromMe | ( | const CTransaction & | tx | ) | const |
should probably be renamed to IsRelevantToMe
Definition at line 1689 of file wallet.cpp.
| bool wallet::CWallet::IsHDEnabled | ( | ) | const |
Definition at line 1710 of file wallet.cpp.
| bool wallet::CWallet::IsMine | ( | const COutPoint & | outpoint | ) | const |
| bool wallet::CWallet::IsMine | ( | const CScript & | script | ) | const |
| bool wallet::CWallet::IsMine | ( | const CTransaction & | tx | ) | const |
| bool wallet::CWallet::IsMine | ( | const CTxDestination & | dest | ) | const |
Definition at line 1643 of file wallet.cpp.
| bool wallet::CWallet::IsMine | ( | const CTxOut & | txout | ) | const |
| bool wallet::CWallet::IsSpent | ( | const COutPoint & | outpoint | ) | const |
Outpoint is spent if any non-conflicted transaction spends it:
Definition at line 757 of file wallet.cpp.
| bool wallet::CWallet::IsSpentKey | ( | const CScript & | scriptPubKey | ) | const |
|
overridevirtual |
check if a certain wallet flag is set
Implements wallet::WalletStorage.
Definition at line 1767 of file wallet.cpp.
| bool wallet::CWallet::LoadToWallet | ( | CWalletTx && | wtx | ) |
| bool wallet::CWallet::LoadWalletFlags | ( | uint64_t | flags | ) |
Loads the flags into the wallet.
(used by LoadWallet)
Definition at line 1772 of file wallet.cpp.
|
private |
Mark a transaction (and its in-wallet descendants) as conflicting with a particular block.
Definition at line 1336 of file wallet.cpp.
| void wallet::CWallet::MarkDirty | ( | ) |
Definition at line 958 of file wallet.cpp.
|
private |
Mark a transaction's inputs dirty, thus forcing the outputs to be recomputed.
Definition at line 1288 of file wallet.cpp.
Mark a transaction as replaced by another transaction.
Definition at line 967 of file wallet.cpp.
| void wallet::CWallet::MaybeUpdateBirthTime | ( | int64_t | time | ) |
Updates wallet birth time if 'time' is below it.
Definition at line 1805 of file wallet.cpp.
|
private |
Mark a transaction (and its in-wallet descendants) as a particular tx state.
Definition at line 1366 of file wallet.cpp.
|
private |
| DBErrors wallet::CWallet::ReorderTransactions | ( | ) |
Definition at line 889 of file wallet.cpp.
| void wallet::CWallet::ResubmitWalletTransactions | ( | node::TxBroadcast | broadcast_method, |
| bool | force | ||
| ) |
Definition at line 1910 of file wallet.cpp.
| void wallet::CWallet::SetLastBlockProcessed | ( | int | block_height, |
| uint256 | block_hash | ||
| ) |
Set last block processed height, and write to database.
Definition at line 651 of file wallet.cpp.
|
private |
Definition at line 643 of file wallet.cpp.
| void wallet::CWallet::SetSpentKeyState | ( | WalletBatch & | batch, |
| const Txid & | hash, | ||
| unsigned int | n, | ||
| bool | used, | ||
| std::set< CTxDestination > & | tx_destinations | ||
| ) |
Definition at line 1010 of file wallet.cpp.
| void wallet::CWallet::SetWalletFlag | ( | uint64_t | flags | ) |
Blocks until the wallet state is up-to-date to /at least/ the current chain at the time this function is entered Obviously holding cs_main/cs_wallet when going into this call may cause deadlock.
set a single wallet flag
Definition at line 1734 of file wallet.cpp.
|
private |
Store wallet flags.
Definition at line 1740 of file wallet.cpp.
| bool wallet::CWallet::ShouldResend | ( | ) | const |
Return true if all conditions for periodically resending transactions are met.
Definition at line 1866 of file wallet.cpp.
| bool wallet::CWallet::SubmitTxMemoryPoolAndRelay | ( | CWalletTx & | wtx, |
| std::string & | err_string, | ||
| node::TxBroadcast | broadcast_method | ||
| ) | const |
Pass this transaction to node for optional mempool insertion and relay to peers.
Definition at line 1813 of file wallet.cpp.
|
private |
Definition at line 729 of file wallet.cpp.
|
private |
Definition at line 1410 of file wallet.cpp.
|
overridevirtual |
Reimplemented from interfaces::Chain::Notifications.
Definition at line 1422 of file wallet.cpp.
| bool wallet::CWallet::TransactionCanBeAbandoned | ( | const Txid & | hashTx | ) | const |
Return whether transaction can be abandoned.
Definition at line 1264 of file wallet.cpp.
|
overridevirtual |
Reimplemented from interfaces::Chain::Notifications.
Definition at line 1465 of file wallet.cpp.
| bool wallet::CWallet::Unlock | ( | const SecureString & | strWalletPassphrase | ) |
|
overrideprivatevirtual |
Unset the blank wallet flag and saves it to disk.
Implements wallet::WalletStorage.
Definition at line 1762 of file wallet.cpp.
| void wallet::CWallet::UnsetWalletFlag | ( | uint64_t | flag | ) |
Unsets a single wallet flag.
Definition at line 1748 of file wallet.cpp.
|
private |
Unsets a wallet flag and saves it to disk.
Definition at line 1754 of file wallet.cpp.
|
overridevirtual |
Reimplemented from interfaces::Chain::Notifications.
Definition at line 1610 of file wallet.cpp.
|
private |
Update mempool conflicts for TRUC sibling transactions.
Definition at line 1271 of file wallet.cpp.
| void wallet::CWallet::UpgradeDescriptorCache | ( | ) |
Upgrade DescriptorCaches.
Definition at line 516 of file wallet.cpp.