Enforce Rust GBT instance lifecycle

This commit is contained in:
Mononaut
2023-06-25 20:37:42 -04:00
parent e903d3ad1f
commit 74604b67fd
4 changed files with 36 additions and 17 deletions

View File

@@ -195,6 +195,7 @@ class DiskCache {
if (data.mempoolArray) {
for (const tx of data.mempoolArray) {
delete tx.uid;
data.mempool[tx.txid] = tx;
}
}
@@ -207,6 +208,7 @@ class DiskCache {
const cacheData2 = JSON.parse(fs.readFileSync(fileName, 'utf8'));
if (cacheData2.mempoolArray) {
for (const tx of cacheData2.mempoolArray) {
delete tx.uid;
data.mempool[tx.txid] = tx;
}
} else {