mempool: rbf option.
This commit is contained in:
parent
f735c7da83
commit
5668e19c7e
@ -106,6 +106,7 @@ function Mempool(options) {
|
|||||||
this.rejectAbsurdFees = this.options.rejectAbsurdFees !== false;
|
this.rejectAbsurdFees = this.options.rejectAbsurdFees !== false;
|
||||||
this.prematureWitness = !!this.options.prematureWitness;
|
this.prematureWitness = !!this.options.prematureWitness;
|
||||||
this.paranoid = !!this.options.paranoid;
|
this.paranoid = !!this.options.paranoid;
|
||||||
|
this.replaceByFee = !!this.options.replaceByFee;
|
||||||
|
|
||||||
this.maxSize = options.maxSize || constants.mempool.MAX_MEMPOOL_SIZE;
|
this.maxSize = options.maxSize || constants.mempool.MAX_MEMPOOL_SIZE;
|
||||||
this.expiryTime = options.expiryTime || constants.mempool.MEMPOOL_EXPIRY;
|
this.expiryTime = options.expiryTime || constants.mempool.MEMPOOL_EXPIRY;
|
||||||
@ -647,11 +648,13 @@ Mempool.prototype._addTX = co(function* _addTX(tx) {
|
|||||||
ret.reason,
|
ret.reason,
|
||||||
ret.score);
|
ret.score);
|
||||||
}
|
}
|
||||||
if (tx.isRBF()) {
|
if (!this.replaceByFee) {
|
||||||
throw new VerifyError(tx,
|
if (tx.isRBF()) {
|
||||||
'nonstandard',
|
throw new VerifyError(tx,
|
||||||
'replace-by-fee',
|
'nonstandard',
|
||||||
0);
|
'replace-by-fee',
|
||||||
|
0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user