cache, serve & display more comprehensive RBF info

This commit is contained in:
Mononaut
2022-12-09 10:32:58 -06:00
parent 48382c9dc7
commit cc628aa443
9 changed files with 159 additions and 18 deletions

View File

@@ -51,8 +51,6 @@ export class Common {
static findRbfTransactions(added: TransactionExtended[], deleted: TransactionExtended[]): { [txid: string]: TransactionExtended } {
const matches: { [txid: string]: TransactionExtended } = {};
deleted
// The replaced tx must have at least one input with nSequence < maxint-1 (Thats the opt-in)
.filter((tx) => tx.vin.some((vin) => vin.sequence < 0xfffffffe))
.forEach((deletedTx) => {
const foundMatches = added.find((addedTx) => {
// The new tx must, absolutely speaking, pay at least as much fee as the replaced tx.