NBitcoin - how to set RBF to true in order to give higher fee for transaction I have a few transactions staying unconfirmed - been a few days now. 

I suspect the minimum  mining fee was upped - 15 minutes prior I was still doing hundreds of transactions a day at that fee - but now it is not enough.

All documentation indicates this is an easy process - simply use the same TX as you used earlier.

I am now feeling that this is more involved.

I took the unconfirmed TX - and goot its prev_hash.

I loaded the TX of this prev_hash and resubmitted it to BlockCypher - and get the message :

Error sending transaction: Unable to lock an input of transactions xxx, likely already spent by yyy..   


It correctly identifies that unconfirmed transaction in yyy placeholder.

Thus it does not want to spend it as its already spent.

Now there is a Readonly RBF property on NBitcoin.Transaction class.

RBF means "Replace by Fee" which is what I want to do - but I can't set it as it is read only.

How do I go about to indicate this is a RBF?
NBitcoin just follow BIP125

public bool RBF
{
    get
    {
        return Inputs.Any(i =&gt; i.Sequence &lt; 0xffffffff - 1);
    }
}


If you are using the TransactionBuilder for creating a transaction, you have two ways:

One is to use TransactionBuilder.SetLockTime(blockHeight) where block height is the currentHeight-1 (actually, if you put 0 it will be fine as well)

The other way is to build your transaction without signing first with TransactionBuilder.BuildTransaction(false) change one of the input sequence, then use TransactionBuilder.SignTransaction to sign.