Replace By Fee - RBF - how to know

HI Everyone

Is it possible to asses if a transaction has been published with Replace by fee - RBF using Bitcore node, P2p2 or Insight API?

Thanks
Daniel

1 Like

Came across this - Opt-In RBF is inside the main code
You have an object called nSequence inside every input in the transaction it’s normally set to UNIT_MAX(4294967295) if you set it to UNIT_MAX-1(4294967294) thats a flag that means that this transaction is RBF. Which I believe means if the sequenceNumber starts with 1 its RBF.

Explicit signaling: A transaction is considered to have opted in to allowing replacement of itself if any of its inputs have an nSequence number less than (0xffffffff - 1). i.e less than 4294967294
Inherited signaling: Transactions that don’t explicitly signal replaceability are replaceable under this policy for as long as any one of their ancestors signals replaceability and remains unconfirmed.

FYI: I have a PR to add this into bitcore-lib https://github.com/bitpay/bitcore-lib/pull/31, and also has been added to insight-api at https://github.com/bitpay/insight-api/blob/master/lib/transactions.js#L164-L166

1 Like