wallet::DiscourageFeeSniping

Set a height-based locktime for new transactions (uses the height of the current chain tip unless we are not synced with the current chain

Synopsis

Declared in <wallet/spend.h>

void
DiscourageFeeSniping(
    CMutableTransaction& tx,
    FastRandomContext& rng_fast,
    interfaces::Chain& chain,
    uint256 const& block_hash,
    int block_height);

Parameters

NameDescription
txThe transaction whose locktime is set.
rng_fastFast random context used to occasionally randomize the locktime.
chainThe chain interface used to query the current tip.
block_hashThe hash of the block used as the reference chain tip.
block_heightThe height of the block used as the reference chain tip.