bool IsArgSet(const std::string &strArg) const
Return true if the given argument has been manually set.
int64_t GetIntArg(const std::string &strArg, int64_t nDefault) const
Return integer argument or default value.
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
Fee rate in satoshis per kilobyte: Amount / kB.
virtual uint64_t GetMaxBlockSize() const =0
Check for block limits when adding transactions.
bool isBelowBlockMinFeeRate(const CFeeRate &txFeeRate) const
static constexpr uint64_t COINBASE_RESERVED_SIGCHECKS
uint64_t nMaxGeneratedBlockSigChecks
bool testTxFits(uint64_t txSize, int64_t txSigChecks) const
Test if a new Tx would "fit" in the block.
void resetBlock()
Clear the block's state and prepare for assembling a new block.
BlockFitter(const Options &options)
uint64_t nMaxGeneratedBlockSize
void removeTxUnchecked(size_t txSize, int64_t txSigChecks, Amount txFee)
Remove accounting for this tx.
void addTx(size_t txSize, int64_t txSigChecks, Amount txFee)
Account for this tx.
static constexpr uint64_t COINBASE_RESERVED_SIZE
static const uint64_t DEFAULT_MAX_BLOCK_SIZE
Default setting for maximum allowed size for a block, in bytes.
uint64_t GetMaxBlockSigChecksCount(uint64_t maxBlockSize)
Compute the maximum number of sigchecks that can be contained in a block given the MAXIMUM block size...
bool ParseMoney(const std::string &money_string, Amount &nRet)
Parse an amount denoted in full coins.
static BlockFitter::Options DefaultOptions(const Config &config)
static constexpr uint64_t DEFAULT_MAX_GENERATED_BLOCK_SIZE
Default for -blockmaxsize, which controls the maximum size of block the mining code will create.
static constexpr Amount DEFAULT_BLOCK_MIN_TX_FEE_PER_KB(1000 *SATOSHI)
Default for -blockmintxfee, which sets the minimum feerate for a transaction in blocks created by min...
static constexpr Amount zero() noexcept
uint64_t nExcessiveBlockSize
uint64_t nMaxGeneratedBlockSize