![]() |
Bitcoin Core 32.99.0
P2P Digital Currency
|
| bool wallet::CWallet::AbandonTransaction | ( | const Txid & | hashTx | ) |
Definition at line 1316 of file wallet.cpp.
| bool wallet::CWallet::AbandonTransaction | ( | CWalletTx & | tx | ) |
Definition at line 829 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 1060 of file wallet.cpp.
| bool wallet::CWallet::AddToWalletIfInvolvingMe | ( | const CTransactionRef & | tx, |
| const SyncTxState & | state, | ||
| bool | rescanning_old_block | ||
| ) |
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 1217 of file wallet.cpp.
|
overridevirtual |
Reimplemented from interfaces::Chain::Notifications.
Definition at line 1552 of file wallet.cpp.
|
overridevirtual |
Reimplemented from interfaces::Chain::Notifications.
Definition at line 1581 of file wallet.cpp.
| bool wallet::CWallet::CanGetAddresses | ( | bool | internal = false | ) | const |
| util::Expected< void, WalletError > wallet::CWallet::ChangeWalletPassphrase | ( | const SecureString & | strOldWalletPassphrase, |
| const SecureString & | strNewWalletPassphrase | ||
| ) |
| void wallet::CWallet::Close | ( | ) |
Close wallet database.
Definition at line 726 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 691 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 1645 of file wallet.cpp.
|
staticprivate |
Definition at line 1901 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 731 of file wallet.cpp.
| uint64_t wallet::CWallet::GetWalletFlags | ( | ) | const |
Retrieve all of the wallet's flags.
Definition at line 1818 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 714 of file wallet.cpp.
| CWallet::SpendType wallet::CWallet::HowSpent | ( | const COutPoint & | outpoint | ) | const |
Definition at line 806 of file wallet.cpp.
| int64_t wallet::CWallet::IncOrderPosNext | ( | WalletBatch * | batch = nullptr | ) |
Increment the next transaction order id.
Definition at line 964 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 1802 of file wallet.cpp.
| bool wallet::CWallet::IsFromMe | ( | const CTransaction & | tx | ) | const |
should probably be renamed to IsRelevantToMe
Definition at line 1707 of file wallet.cpp.
| bool wallet::CWallet::IsHDEnabled | ( | ) | const |
Definition at line 1728 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 1661 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 789 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 1785 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 1790 of file wallet.cpp.
|
private |
Mark a transaction (and its in-wallet descendants) as conflicting with a particular block.
Definition at line 1354 of file wallet.cpp.
| void wallet::CWallet::MarkDirty | ( | ) |
Definition at line 976 of file wallet.cpp.
|
private |
Mark a transaction's inputs dirty, thus forcing the outputs to be recomputed.
Definition at line 1306 of file wallet.cpp.
Mark a transaction as replaced by another transaction.
Definition at line 985 of file wallet.cpp.
| void wallet::CWallet::MaybeUpdateBirthTime | ( | int64_t | time | ) |
Updates wallet birth time if 'time' is below it.
Definition at line 1823 of file wallet.cpp.
|
private |
Mark a transaction (and its in-wallet descendants) as a particular tx state.
Definition at line 1384 of file wallet.cpp.
|
private |
| DBErrors wallet::CWallet::ReorderTransactions | ( | ) |
Definition at line 907 of file wallet.cpp.
| void wallet::CWallet::ResubmitWalletTransactions | ( | node::TxBroadcast | broadcast_method, |
| bool | force | ||
| ) |
Definition at line 1928 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 683 of file wallet.cpp.
|
private |
Definition at line 675 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 1028 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 1752 of file wallet.cpp.
|
private |
Store wallet flags.
Definition at line 1758 of file wallet.cpp.
| bool wallet::CWallet::ShouldResend | ( | ) | const |
Return true if all conditions for periodically resending transactions are met.
Definition at line 1884 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 1831 of file wallet.cpp.
|
private |
Definition at line 761 of file wallet.cpp.
|
private |
Definition at line 1428 of file wallet.cpp.
|
overridevirtual |
Reimplemented from interfaces::Chain::Notifications.
Definition at line 1440 of file wallet.cpp.
| bool wallet::CWallet::TransactionCanBeAbandoned | ( | const Txid & | hashTx | ) | const |
Return whether transaction can be abandoned.
Definition at line 1282 of file wallet.cpp.
|
overridevirtual |
Reimplemented from interfaces::Chain::Notifications.
Definition at line 1483 of file wallet.cpp.
| util::Expected< void, WalletError > wallet::CWallet::Unlock | ( | const SecureString & | strWalletPassphrase | ) |
|
static |
Definition at line 590 of file wallet.cpp.
|
overrideprivatevirtual |
Unset the blank wallet flag and saves it to disk.
Implements wallet::WalletStorage.
Definition at line 1780 of file wallet.cpp.
| void wallet::CWallet::UnsetWalletFlag | ( | uint64_t | flag | ) |
Unsets a single wallet flag.
Definition at line 1766 of file wallet.cpp.
|
private |
Unsets a wallet flag and saves it to disk.
Definition at line 1772 of file wallet.cpp.
|
overridevirtual |
Reimplemented from interfaces::Chain::Notifications.
Definition at line 1628 of file wallet.cpp.
|
private |
Update mempool conflicts for TRUC sibling transactions.
Definition at line 1289 of file wallet.cpp.
| void wallet::CWallet::UpgradeDescriptorCache | ( | ) |
Upgrade DescriptorCaches.
Definition at line 516 of file wallet.cpp.