Changeset View
Changeset View
Standalone View
Standalone View
src/policy/policy.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_POLICY_POLICY_H | #ifndef BITCOIN_POLICY_POLICY_H | ||||
#define BITCOIN_POLICY_POLICY_H | #define BITCOIN_POLICY_POLICY_H | ||||
#include <consensus/consensus.h> | #include <consensus/consensus.h> | ||||
#include <feerate.h> | #include <feerate.h> | ||||
#include <script/standard.h> | #include <script/standard.h> | ||||
#include <string> | #include <string> | ||||
class CCoinsViewCache; | class CCoinsViewCache; | ||||
class CTransaction; | class CTransaction; | ||||
class CTxOut; | |||||
/** | /** | ||||
* Default for -blockmaxsize, which controls the maximum size of block the | * Default for -blockmaxsize, which controls the maximum size of block the | ||||
* mining code will create. | * mining code will create. | ||||
*/ | */ | ||||
static const uint64_t DEFAULT_MAX_GENERATED_BLOCK_SIZE = 2 * ONE_MEGABYTE; | static const uint64_t DEFAULT_MAX_GENERATED_BLOCK_SIZE = 2 * ONE_MEGABYTE; | ||||
/** | /** | ||||
* Default for -blockprioritypercentage, define the amount of block space | * Default for -blockprioritypercentage, define the amount of block space | ||||
▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Used as the flags parameter to sequence and nLocktime checks in non-consensus | * Used as the flags parameter to sequence and nLocktime checks in non-consensus | ||||
* code. | * code. | ||||
*/ | */ | ||||
static const uint32_t STANDARD_LOCKTIME_VERIFY_FLAGS = | static const uint32_t STANDARD_LOCKTIME_VERIFY_FLAGS = | ||||
LOCKTIME_VERIFY_SEQUENCE | LOCKTIME_MEDIAN_TIME_PAST; | LOCKTIME_VERIFY_SEQUENCE | LOCKTIME_MEDIAN_TIME_PAST; | ||||
Amount GetDustThreshold(const CTxOut &txout, const CFeeRate &dustRelayFee); | |||||
bool IsDust(const CTxOut &txout, const CFeeRate &dustRelayFee); | |||||
/** | /** | ||||
* Used as the flags parameters to check for sigops as if OP_CHECKDATASIG is | * Used as the flags parameters to check for sigops as if OP_CHECKDATASIG is | ||||
* enabled. Can be removed after OP_CHECKDATASIG is activated as the flag is | * enabled. Can be removed after OP_CHECKDATASIG is activated as the flag is | ||||
* made standard. | * made standard. | ||||
*/ | */ | ||||
static const uint32_t STANDARD_CHECKDATASIG_VERIFY_FLAGS = | static const uint32_t STANDARD_CHECKDATASIG_VERIFY_FLAGS = | ||||
STANDARD_SCRIPT_VERIFY_FLAGS | SCRIPT_ENABLE_CHECKDATASIG; | STANDARD_SCRIPT_VERIFY_FLAGS | SCRIPT_ENABLE_CHECKDATASIG; | ||||
Show All 23 Lines |