Don't push full RBF-transactions to prevent old states.

This commit is contained in:
softsimon 2022-03-08 18:54:49 +01:00
parent b15de021f7
commit 8267344cdc
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
2 changed files with 4 additions and 12 deletions

View File

@ -355,17 +355,9 @@ class WebsocketHandler {
if (rbfTransactions[client['track-tx']]) {
for (const rbfTransaction in rbfTransactions) {
if (client['track-tx'] === rbfTransaction) {
const rbfTx = rbfTransactions[rbfTransaction];
if (config.MEMPOOL.BACKEND !== 'esplora') {
try {
const fullTx = await transactionUtils.$getTransactionExtended(rbfTx.txid, true);
response['rbfTransaction'] = fullTx;
} catch (e) {
logger.debug('Error finding transaction in mempool: ' + (e instanceof Error ? e.message : e));
}
} else {
response['rbfTransaction'] = rbfTx;
}
response['rbfTransaction'] = {
txid: rbfTransactions[rbfTransaction].txid,
};
break;
}
}

View File

@ -235,7 +235,7 @@ export class TransactionComponent implements OnInit, OnDestroy {
});
this.txReplacedSubscription = this.stateService.txReplaced$.subscribe((rbfTransaction) => {
if (!rbfTransaction.size) {
if (!this.tx) {
this.error = new Error();
this.waitingForTransaction = false;
}