Blackcoin Lore
This commit is contained in:
@@ -56,6 +56,15 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType)
|
||||
return whichType != TX_NONSTANDARD;
|
||||
}
|
||||
|
||||
int64_t FutureDrift(int64_t nTime)
|
||||
{
|
||||
// loose policy for FutureDrift in regtest mode
|
||||
if (Params().GetConsensus().fPowNoRetargeting && chainActive.Height() <= Params().GetConsensus().nLastPOWBlock) {
|
||||
return nTime + 24 * 60 * 60;
|
||||
}
|
||||
return Params().GetConsensus().IsProtocolV2(nTime) ? nTime + 15 : nTime + 10 * 60;
|
||||
}
|
||||
|
||||
bool IsStandardTx(const CTransaction& tx, std::string& reason)
|
||||
{
|
||||
if (tx.nVersion > CTransaction::MAX_STANDARD_VERSION || tx.nVersion < 1) {
|
||||
@@ -111,8 +120,9 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason)
|
||||
}
|
||||
}
|
||||
|
||||
// only one OP_RETURN txout is permitted
|
||||
if (nDataOut > 1) {
|
||||
// not more than one data txout per non-data txout is permitted
|
||||
// only one data txout is permitted too
|
||||
if (nDataOut > 1 && nDataOut > tx.vout.size()/2) {
|
||||
reason = "multi-op-return";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -33,28 +33,26 @@ static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300;
|
||||
* blocks and we must accept those blocks.
|
||||
*/
|
||||
static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS |
|
||||
SCRIPT_VERIFY_DERSIG |
|
||||
SCRIPT_VERIFY_STRICTENC |
|
||||
SCRIPT_VERIFY_MINIMALDATA |
|
||||
SCRIPT_VERIFY_NULLDUMMY |
|
||||
SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS |
|
||||
SCRIPT_VERIFY_CLEANSTACK |
|
||||
SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY |
|
||||
SCRIPT_VERIFY_CHECKSEQUENCEVERIFY |
|
||||
SCRIPT_VERIFY_LOW_S;
|
||||
SCRIPT_VERIFY_CHECKSEQUENCEVERIFY;
|
||||
|
||||
/** For convenience, standard but not mandatory verify flags. */
|
||||
static const unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS;
|
||||
|
||||
/** Used as the flags parameter to sequence and nLocktime checks in non-consensus code. */
|
||||
static const unsigned int STANDARD_LOCKTIME_VERIFY_FLAGS = LOCKTIME_VERIFY_SEQUENCE |
|
||||
LOCKTIME_MEDIAN_TIME_PAST;
|
||||
static const unsigned int STANDARD_LOCKTIME_VERIFY_FLAGS = 0;
|
||||
|
||||
bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
|
||||
/**
|
||||
* Check for standard transaction types
|
||||
* @return True if all outputs (scriptPubKeys) use only standard transaction forms
|
||||
*/
|
||||
|
||||
int64_t FutureDrift(int64_t nTime);
|
||||
|
||||
bool IsStandardTx(const CTransaction& tx, std::string& reason);
|
||||
/**
|
||||
* Check for standard transaction types
|
||||
|
||||
Reference in New Issue
Block a user