New backend config "NETWORK".
Only activate mempool protection. Log network to fixes #140
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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}.`);
|
||||
|
||||
Reference in New Issue
Block a user