Merge pull request #4772 from mempool/mononaut/replacement-skeleton

Fix recent replacements skeleton loader
This commit is contained in:
wiz
2024-03-16 17:19:18 +09:00
committed by GitHub
2 changed files with 6 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ class WebsocketHandler {
private socketData: { [key: string]: string } = {};
private serializedInitData: string = '{}';
private lastRbfSummary: ReplacementInfo | null = null;
private lastRbfSummary: ReplacementInfo[] | null = null;
constructor() { }
@@ -464,10 +464,11 @@ class WebsocketHandler {
let rbfReplacements;
let fullRbfReplacements;
let rbfSummary;
if (Object.keys(rbfChanges.trees).length) {
if (Object.keys(rbfChanges.trees).length || !this.lastRbfSummary) {
rbfReplacements = rbfCache.getRbfTrees(false);
fullRbfReplacements = rbfCache.getRbfTrees(true);
rbfSummary = rbfCache.getLatestRbfSummary();
rbfSummary = rbfCache.getLatestRbfSummary() || [];
this.lastRbfSummary = rbfSummary;
}
for (const deletedTx of deletedTransactions) {