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 <policy/settings.h> | |||||
#include <script/standard.h> | #include <script/standard.h> | ||||
#include <string> | #include <string> | ||||
class CCoinsViewCache; | class CCoinsViewCache; | ||||
class CTransaction; | class CTransaction; | ||||
class CTxIn; | class CTxIn; | ||||
class CTxOut; | class CTxOut; | ||||
▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
int64_t GetVirtualTransactionSize(int64_t nSize, int64_t nSigOpCount, | int64_t GetVirtualTransactionSize(int64_t nSize, int64_t nSigOpCount, | ||||
unsigned int bytes_per_sigop); | unsigned int bytes_per_sigop); | ||||
int64_t GetVirtualTransactionSize(const CTransaction &tx, int64_t nSigOpCount, | int64_t GetVirtualTransactionSize(const CTransaction &tx, int64_t nSigOpCount, | ||||
unsigned int bytes_per_sigop); | unsigned int bytes_per_sigop); | ||||
int64_t GetVirtualTransactionInputSize(const CTxIn &txin, int64_t nSigOpCount, | int64_t GetVirtualTransactionInputSize(const CTxIn &txin, int64_t nSigOpCount, | ||||
unsigned int bytes_per_sigop); | unsigned int bytes_per_sigop); | ||||
static inline int64_t GetVirtualTransactionSize(int64_t nSize, | |||||
int64_t nSigOpCount) { | |||||
return GetVirtualTransactionSize(nSize, nSigOpCount, ::nBytesPerSigOp); | |||||
} | |||||
#endif // BITCOIN_POLICY_POLICY_H | #endif // BITCOIN_POLICY_POLICY_H |