Skip to content

Commit e5628f2

Browse files
committed
OptInRBF was not setting NonFinalSequenceSet
1 parent c17142e commit e5628f2

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

NBitcoin.Tests/transaction_tests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,7 @@ public void CanBuildTransaction()
17441744
.SendFees(Money.Parse("0.0001"))
17451745
.SetChange(destinations[3])
17461746
.BuildTransaction(true);
1747+
Assert.False(tx.RBF);
17471748
Assert.True(txBuilder.Verify(tx, "0.0001"));
17481749

17491750
// Let's check if PSBT can be finalized

NBitcoin/TransactionBuilder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,6 +1427,7 @@ private IEnumerable<ICoin> BuildTransaction(
14271427
if(OptInRBF)
14281428
{
14291429
input.Sequence = Sequence.OptInRBF;
1430+
ctx.NonFinalSequenceSet = true;
14301431
}
14311432
if(_LockTime != null && !ctx.NonFinalSequenceSet)
14321433
{

0 commit comments

Comments
 (0)