aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-01-16 19:32:51 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-01-16 19:33:08 +0100
commitdd98f045382428f450dc917a3933c9e4e8e1ba99 (patch)
tree3dcc0f69a886c8eb4fee8378447ca4a15031b22d /src/miner.cpp
parent8a445c5651edb9a1f51497055b7ddf4402be9188 (diff)
parenteb30d1a5b215c6dd3763d7f7948f2dd8cb61f6bf (diff)
downloadbitcoin-dd98f045382428f450dc917a3933c9e4e8e1ba99.tar.xz
Merge #9380: Separate different uses of minimum fees
eb30d1a Introduce -dustrelayfee (Alex Morcos) 7b1add3 Introduce -incrementalrelayfee (Alex Morcos) daec955 Introduce -blockmintxfee (Alex Morcos)
Diffstat (limited to 'src/miner.cpp')
-rw-r--r--src/miner.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/miner.cpp b/src/miner.cpp
index 856e9edc14..acded94168 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -95,12 +95,18 @@ BlockAssembler::BlockAssembler(const CChainParams& _chainparams)
nBlockMaxWeight = nBlockMaxSize * WITNESS_SCALE_FACTOR;
}
}
+ if (IsArgSet("-blockmintxfee")) {
+ CAmount n = 0;
+ ParseMoney(GetArg("-blockmintxfee", ""), n);
+ blockMinFeeRate = CFeeRate(n);
+ } else {
+ blockMinFeeRate = CFeeRate(DEFAULT_BLOCK_MIN_TX_FEE);
+ }
// Limit weight to between 4K and MAX_BLOCK_WEIGHT-4K for sanity:
nBlockMaxWeight = std::max((unsigned int)4000, std::min((unsigned int)(MAX_BLOCK_WEIGHT-4000), nBlockMaxWeight));
// Limit size to between 1K and MAX_BLOCK_SERIALIZED_SIZE-1K for sanity:
nBlockMaxSize = std::max((unsigned int)1000, std::min((unsigned int)(MAX_BLOCK_SERIALIZED_SIZE-1000), nBlockMaxSize));
-
// Whether we need to account for byte usage (in addition to weight usage)
fNeedSizeAccounting = (nBlockMaxSize < MAX_BLOCK_SERIALIZED_SIZE-1000);
}
@@ -460,7 +466,7 @@ void BlockAssembler::addPackageTxs()
packageSigOpsCost = modit->nSigOpCostWithAncestors;
}
- if (packageFees < ::minRelayTxFee.GetFee(packageSize)) {
+ if (packageFees < blockMinFeeRate.GetFee(packageSize)) {
// Everything else we might consider has a lower fee rate
return;
}