New backend config "NETWORK".

Only activate mempool protection.
Log network to
fixes #140
This commit is contained in:
softsimon committed 2020-10-15 11:07:53 +07:00
1 parent be59db31c4
commit 6dea589820
4 files changed
+8 -5

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ import projectedBlocks from './mempool-blocks';
class FeeApi {
constructor() { }
defaultFee = config.LIQUID ? 0.1 : 1;
defaultFee = config.NETWORK === 'liquid' ? 0.1 : 1;
public getRecommendedFee() {
const pBlocks = projectedBlocks.getMempoolBlocks();
+2 -1
View File
@@ -135,7 +135,8 @@ class Mempool {
}
// Prevent mempool from clear on bitcoind restart by delaying the deletion
if (this.mempoolProtection === 0 && transactions.length / currentMempoolSize <= 0.80) {
if ((config.NETWORK === 'mainnet' || !config.NETWORK)
&& this.mempoolProtection === 0 && transactions.length / currentMempoolSize <= 0.80) {
this.mempoolProtection = 1;
this.inSync = false;
logger.warn(`Mempool clear protection triggered because transactions.length: ${transactions.length} and currentMempoolSize: ${currentMempoolSize}.`);