Changeset View
Changeset View
Standalone View
Standalone View
src/consensus/consensus.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_CONSENSUS_CONSENSUS_H | #ifndef BITCOIN_CONSENSUS_CONSENSUS_H | ||||
#define BITCOIN_CONSENSUS_CONSENSUS_H | #define BITCOIN_CONSENSUS_CONSENSUS_H | ||||
#include <cstdint> | #include <cstdint> | ||||
/** 1MB */ | /** 1MB */ | ||||
static const uint64_t ONE_MEGABYTE = 1000000; | static const uint64_t ONE_MEGABYTE = 1000000; | ||||
/** The maximum allowed size for a transaction, in bytes */ | /** The maximum allowed size for a transaction, in bytes */ | ||||
static const uint64_t MAX_TX_SIZE = ONE_MEGABYTE; | static const uint64_t MAX_TX_SIZE = ONE_MEGABYTE; | ||||
/** The minimum allowed size for a transaction, in bytes */ | |||||
static const uint64_t MIN_TX_SIZE = 100; | |||||
/** The maximum allowed size for a block, before the UAHF */ | /** The maximum allowed size for a block, before the UAHF */ | ||||
static const uint64_t LEGACY_MAX_BLOCK_SIZE = ONE_MEGABYTE; | static const uint64_t LEGACY_MAX_BLOCK_SIZE = ONE_MEGABYTE; | ||||
/** Default setting for maximum allowed size for a block, in bytes */ | /** Default setting for maximum allowed size for a block, in bytes */ | ||||
static const uint64_t DEFAULT_MAX_BLOCK_SIZE = 32 * ONE_MEGABYTE; | static const uint64_t DEFAULT_MAX_BLOCK_SIZE = 32 * ONE_MEGABYTE; | ||||
/** | /** | ||||
* The maximum allowed number of signature check operations per MB in a block | * The maximum allowed number of signature check operations per MB in a block | ||||
* (network rule). | * (network rule). | ||||
*/ | */ | ||||
Show All 34 Lines |