Increasing clear protection period to 10 minutes.

This commit is contained in:
softsimon
2021-01-24 19:33:05 +07:00
parent 86902d6f33
commit cca95bbd66

View File

@@ -10,6 +10,7 @@ import loadingIndicators from './loading-indicators';
class Mempool { class Mempool {
private static WEBSOCKET_REFRESH_RATE_MS = 10000; private static WEBSOCKET_REFRESH_RATE_MS = 10000;
private static CLEAR_PROTECTION_MINUTES = 10;
private inSync: boolean = false; private inSync: boolean = false;
private mempoolCache: { [txId: string]: TransactionExtended } = {}; private mempoolCache: { [txId: string]: TransactionExtended } = {};
private mempoolInfo: IBitcoinApi.MempoolInfo = { loaded: false, size: 0, bytes: 0, usage: 0, private mempoolInfo: IBitcoinApi.MempoolInfo = { loaded: false, size: 0, bytes: 0, usage: 0,
@@ -143,7 +144,7 @@ class Mempool {
setTimeout(() => { setTimeout(() => {
this.mempoolProtection = 2; this.mempoolProtection = 2;
logger.warn('Mempool clear protection resumed.'); logger.warn('Mempool clear protection resumed.');
}, 1000 * 60 * 2); }, 1000 * 60 * Mempool.CLEAR_PROTECTION_MINUTES);
} }
let newMempool = {}; let newMempool = {};