Blackcoin Lore

This commit is contained in:
janko33bd
2017-05-30 21:33:31 +02:00
parent 597c9b42e5
commit 2fdd12b2ea
141 changed files with 4385 additions and 3872 deletions

View File

@@ -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;
}