[#wallet-DiscourageFeeSniping] = xref:wallet.adoc[wallet]::DiscourageFeeSniping :relfileprefix: ../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void DiscourageFeeSniping( xref:CMutableTransaction.adoc[CMutableTransaction]& tx, xref:FastRandomContext.adoc[FastRandomContext]& rng_fast, xref:interfaces/Chain.adoc[interfaces::Chain]& chain, xref:uint256.adoc[uint256] const& block_hash, int block_height); ---- == Parameters [cols="1,4"] |=== | Name| Description | *tx* | The transaction whose locktime is set. | *rng_fast* | Fast random context used to occasionally randomize the locktime. | *chain* | The chain interface used to query the current tip. | *block_hash* | The hash of the block used as the reference chain tip. | *block_height* | The height of the block used as the reference chain tip. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#