![]() |
PIVX Core
5.6.99
P2P Digital Currency
|
#include "consensus/consensus.h"#include "feerate.h"#include "script/interpreter.h"#include "script/standard.h"#include <string>Go to the source code of this file.
Functions | |
| BOOST_STATIC_ASSERT (DEFAULT_BLOCK_MAX_SIZE<=MAX_BLOCK_SIZE_CURRENT) | |
| CAmount | GetDustThreshold (const CTxOut &txout, const CFeeRate &dustRelayFeeIn) |
| bool | IsDust (const CTxOut &txout, const CFeeRate &dustRelayFeeIn) |
| CAmount | GetDustThreshold (const CFeeRate &dustRelayFeeIn) |
| CAmount | GetShieldedDustThreshold (const CFeeRate &dustRelayFeeIn) |
| bool | IsStandard (const CScript &scriptPubKey, txnouttype &whichType) |
| Check transaction inputs to mitigate two potential denial-of-service attacks: More... | |
| bool | IsStandardTx (const CTransactionRef &tx, int nBlockHeight, std::string &reason) |
| Check for standard transaction types. More... | |
| bool | AreInputsStandard (const CTransaction &tx, const CCoinsViewCache &mapInputs) |
| Check for standard transaction types. More... | |
Variables | |
| bool | fIsBareMultisigStd |
| CFeeRate | dustRelayFee |
| bool AreInputsStandard | ( | const CTransaction & | tx, |
| const CCoinsViewCache & | mapInputs | ||
| ) |
Check for standard transaction types.
| [in] | mapInputs | Map of previous transactions that have outputs we're spending |
Definition at line 191 of file policy.cpp.
| BOOST_STATIC_ASSERT | ( | DEFAULT_BLOCK_MAX_SIZE<= | MAX_BLOCK_SIZE_CURRENT | ) |
Definition at line 21 of file policy.cpp.
Definition at line 45 of file policy.cpp.
| bool IsStandard | ( | const CScript & | scriptPubKey, |
| txnouttype & | whichType | ||
| ) |
Check transaction inputs to mitigate two potential denial-of-service attacks:
Check transaction inputs, and make sure any pay-to-script-hash transactions are evaluating IsStandard scripts
Why bother? To avoid denial-of-service attacks; an attacker can submit a standard HASH... OP_EQUAL transaction, which will get accepted into blocks. The redemption script can be anything; an attacker could use a very expensive-to-check-upon-redemption script like: DUP CHECKSIG DROP ... repeated 100 times... OP_1
Definition at line 78 of file policy.cpp.
| bool IsStandardTx | ( | const CTransactionRef & | tx, |
| int | nBlockHeight, | ||
| std::string & | reason | ||
| ) |
Check for standard transaction types.
Definition at line 100 of file policy.cpp.
|
extern |
Definition at line 19 of file policy.cpp.
|
extern |
Definition at line 17 of file policy.cpp.