Bitcoin Cancel Transaction

The trick to “cancel” your pending transaction is by replacing the transaction with BTC amount send back to yourself but with higher transaction fees.

This is useful also when your transaction stuck in mempool. Replace it with new transaction with higher transaction fees.

Theorically you just have around 10 minutes interval to carry out this action before transaction comfirmation turn to 1.

Enable opt-in RBF (replace by fees)

nSequence in any input with value of <= 0xfffffffd will enable RBF.

$tx = $tx->input($utxo_hash, $utxo_n_output, null, 4294967293);
$tx = $tx->spendOutputFrom($utxo_hash, $utxo_n_output, null, 4294967293);

Above codings nSequence 4294967293 equal to 0xfffffffd.

About Us
Contents have been open source in GITHUB. Please give me a ⭐ if you found this helpful :)
Problem? Raise me a new issue.
Support Us
Buy me a coffee. so i can spend more nights for this :)

BTCSCHOOLS would like to present you with more pratical but little theory throughout our tutorials. Pages' content are constantly keep reviewed to avoid mistakes, but we cannot warrant correctness of all contents. While using this site, you agree to accept our terms of use, cookie & privacy policy. Copyright 2019 by BTCSCHOOLS. All Rights Reserved.