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.prematureWitness = !!this.options.prematureWitness;
|
||||
this.paranoid = !!this.options.paranoid;
|
||||
this.replaceByFee = !!this.options.replaceByFee;
|
||||
|
||||
this.maxSize = options.maxSize || constants.mempool.MAX_MEMPOOL_SIZE;
|
||||
this.expiryTime = options.expiryTime || constants.mempool.MEMPOOL_EXPIRY;
|
||||
@ -647,11 +648,13 @@ Mempool.prototype._addTX = co(function* _addTX(tx) {
|
||||
ret.reason,
|
||||
ret.score);
|
||||
}
|
||||
if (tx.isRBF()) {
|
||||
throw new VerifyError(tx,
|
||||
'nonstandard',
|
||||
'replace-by-fee',
|
||||
0);
|
||||
if (!this.replaceByFee) {
|
||||
if (tx.isRBF()) {
|
||||
throw new VerifyError(tx,
|
||||
'nonstandard',
|
||||
'replace-by-fee',
|
||||
0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user