Available on crate feature
transparent-inputs and (crate features test-dependencies) only.Re-exports§
pub use super::pool::locking::transparent_note_locking;
Functions§
- gap_
limits - get_
spendable_ transparent_ outputs_ for_ addresses - Verifies that
InputSource::get_spendable_transparent_outputs_for_addressesreturns the spendable outputs for a set of addresses in a single call, equivalent to the union of per-address queries, and honours subset and empty requests. - import_
standalone_ transparent_ address transparent-key-import - Tests that importing standalone transparent addresses without key material succeeds and
the addresses appear in
get_transparent_receiverswith theTransparentAddressSource::StandaloneAddresssource. - import_
standalone_ transparent_ address_ balance transparent-key-import - Tests that a UTXO received at an address imported without key material is reflected in the wallet balance, but is not offered as a spendable output.
- import_
standalone_ transparent_ address_ conflict transparent-key-import - Tests that importing the same standalone address to a different account fails.
- import_
standalone_ transparent_ address_ idempotent transparent-key-import - Tests that importing the same standalone address twice to the same account is idempotent.
- import_
standalone_ transparent_ address_ upgrade transparent-key-import - Tests that importing key material for a previously address-only import upgrades the address in place: the pubkey (P2PKH) or redeem script (P2SH) becomes the address’s source, without a duplicate receiver appearing.
- import_
standalone_ transparent_ p2sh transparent-key-import - Tests that importing a standalone P2SH address succeeds and the address appears
in
get_transparent_receiverswith the correctTransparentAddressSource. - import_
standalone_ transparent_ p2sh_ balance transparent-key-import - Tests that a UTXO received at a standalone P2SH address is reflected in the wallet balance.
- import_
standalone_ transparent_ p2sh_ conflict transparent-key-import - Tests that importing the same P2SH address to a different account fails.
- import_
standalone_ transparent_ p2sh_ idempotent transparent-key-import - Tests that importing the same P2SH address twice to the same account is idempotent.
- import_
standalone_ transparent_ pubkey transparent-key-import - Tests that importing a standalone transparent public key succeeds.
- import_
standalone_ transparent_ pubkey_ balance transparent-key-import - Tests that a UTXO received at a standalone P2PKH address is reflected in the wallet balance.
- import_
standalone_ transparent_ pubkey_ conflict transparent-key-import - Tests that importing the same pubkey to a different account fails.
- import_
standalone_ transparent_ pubkey_ idempotent transparent-key-import - Tests that importing the same pubkey twice to the same account is idempotent.
- mark_
transparent_ addresses_ exposed - Tests
WalletWrite::mark_transparent_addresses_exposedby observing the effect on the address’s exposure metadata viaWalletRead::get_transparent_address_metadata. - mark_
transparent_ addresses_ exposed_ bulk - Tests that
WalletWrite::mark_transparent_addresses_exposedcorrectly handles bulk input: all addresses in a successful call must be marked, and an unrecognized address must cause the entire call to be rolled back. - mark_
transparent_ addresses_ exposed_ unknown_ address - Tests that
WalletWrite::mark_transparent_addresses_exposedreturns an error when asked to mark an address that the wallet does not track. - propose_
t2shielded_ requires_ transparent_ regather - Verifies that
GreedyInputSelector::propose_transactionsuccessfully re-gathers transparent inputs when the initial fee-aware gather’s estimate (which accounts only for the transparent side of the transaction) turns out to be insufficient once the real change strategy accounts for the additional shielded action required by a shielded payment recipient. - propose_
t2t_ any_ account_ taddr - With
TransparentSpendPolicy::any_account_addr(the legacyANY_TADDRbehavior), a transfer may spend the account’s transparent UTXOs. Verifies that the funding UTXO is selected as a transparent input and that the proposal balance is consistent. - propose_
t2t_ from_ addresses - With a
TransparentSource::FromAddressestransparent source, only the explicitly named transparent addresses are eligible. Funds two of the account’s external receivers but names only one; the proposal must select solely from the named address. - propose_
t2t_ shielded_ only_ is_ insufficient - Regression test enforcing the privacy invariant: with the default
default spend policy (which permits no transparent spending), a transfer must NOT silently spend
the account’s transparent UTXOs as a fallback. An account holding only transparent
funds must fail with
InsufficientFundsrather than producing a t->t proposal. - propose_
t2t_ transparent_ change_ exact_ match - Tests that when a fully-transparent transaction balances exactly (input value equals
payments plus the minimum fee), no transparent change output is produced even when the
change strategy is configured with
TransparentChangePolicy::TransparentChangeAllowed. - propose_
t2t_ with_ transparent_ change - Tests the full lifecycle of a t->t transfer with transparent change: a change strategy
configured with
TransparentChangePolicy::TransparentChangeAllowedmust propose a non-ephemeral transparent change output, and transaction creation must send that change to a previously-unexposed internal-scope (change) transparent address of the spending account, where it is recorded as received and becomes spendable once mined. - propose_
transfer_ transparent_ input_ cap - Verifies that
GreedyInputSelector::with_shielding_block_space_percentalso bounds the transparent gather performed for general (non-shielding) transfers, not just shielding. - put_
blocks_ rolls_ back_ transparent_ outputs - Verifies that the transparent outputs written while persisting a batch of scanned blocks are rolled back along with the rest of the batch when a later block in the batch is rejected.
- put_
received_ transparent_ utxo - put_
received_ unmined_ utxo_ uses_ mempool_ height_ expiry_ delta - Tests that an unmined UTXO received when the chain tip is one block below NU7 activation is assumed to expire after the default expiry delta for the mempool height, which is the NU7 activation height.
- reserve_
next_ n_ internal_ addresses_ gap_ limit - Tests that
WalletWrite::reserve_next_n_internal_addressesreserves sequential internal-scope (change) addresses, that reservation observes the internal-scope gap limit, and that internal-scope reservations are accounted independently of ephemeral-scope reservations. - scan_
detects_ out_ of_ order_ transparent_ spend - Scans a block that spends a wallet transparent output before scanning the block that created it, and verifies that the spend is recognized once the output is discovered.
- scan_
detects_ transparent_ spend - Scans a block that pays a wallet transparent address, then the block that spends the output, and verifies that the spend is recognized directly during the scan of the later block.
- scan_
full_ block_ detects_ out_ of_ order_ transparent_ spend - Scans a full block that spends a wallet transparent output before the block that created it, and verifies that the spend is resolved once the output is discovered.
- scan_
full_ block_ detects_ transparent_ spend - Scans a full block that pays a wallet transparent address, then a full block that spends the resulting output, and verifies that the spend is detected.
- scan_
full_ block_ persists_ transparent_ outputs - Scans a full block containing a transparent output that pays a wallet address, and verifies
that persisting the scanned block via
WalletWrite::put_blocksrecords that output as a UTXO belonging to the wallet. - shielding_
many_ transparent_ utxos - Regression test for PRO-291: shielding a transparent balance composed of many P2PKH
UTXOs must not fail with
ChangeRequireddue to fee disagreement between the proposal and builder layers. - shielding_
transparent_ input_ cap - Verifies that a shielding proposal caps the number of transparent inputs in a single transaction to the selector’s configured fraction of block space, selecting the highest-value UTXOs first and leaving the remainder unspent.
- spend_
from_ standalone_ p2sh transparent-key-import - Tests spending from a standalone P2SH (multisig) address by shielding its balance.
- spend_
from_ standalone_ pubkey transparent-key-import - Tests spending from a standalone P2PKH address by shielding its balance.
- transparent_
balance_ across_ shielding - transparent_
balance_ spendability - This test attempts to verify that transparent funds spendability is accounted for properly given the different minimum confirmations values that can be set when querying for balances.
- transparent_
coinbase_ balance_ dust - Verifies that dust-valued (uneconomic) transparent outputs are reported in the
uneconomic_valuefield of the correctAccountBalancebucket (regular vs. coinbase). - transparent_
coinbase_ balance_ split - Verifies that transparent funds are reported in the correct
AccountBalancebucket (regular vs. coinbase), that immature coinbase value is reported as pending rather than spendable, and that it becomes spendable upon reaching coinbase maturity. - value_
bounded_ transparent_ gather - Verifies that the value-bounded
select_spendable_transparent_outputsgather returns only enough UTXOs to cover the requestedTargetValue, rather than every spendable output held by the account. This is the behavior that prevents wallets with large numbers of small transparent UTXOs (e.g. recoveredzcashdimports) from falling over when a small transfer is requested.