Restore possibility of negative timestamps for PoS
This commit is contained in:
@@ -3783,11 +3783,6 @@ bool CheckBlockHeader(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,
|
|||||||
return false; //state.Invalid(error("CheckBlockHeader(): block timestamp too far in the future"),REJECT_INVALID, "time-too-new");
|
return false; //state.Invalid(error("CheckBlockHeader(): block timestamp too far in the future"),REJECT_INVALID, "time-too-new");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ASSETCHAINS_STAKED != 0 && pindex != 0 && pindex->pprev != 0 && pindex->nTime <= pindex->pprev->nTime )
|
|
||||||
{
|
|
||||||
fprintf(stderr,"ht.%d %u vs ht.%d %u, is not monotonic\n",pindex->nHeight,pindex->nTime,pindex->pprev->nHeight,pindex->pprev->nTime);
|
|
||||||
return state.Invalid(error("CheckBlockHeader(): block timestamp needs to always increase"),REJECT_INVALID, "time-too-new");
|
|
||||||
}
|
|
||||||
// Check block version
|
// Check block version
|
||||||
if (height > 0 && blockhdr.nVersion < MIN_BLOCK_VERSION)
|
if (height > 0 && blockhdr.nVersion < MIN_BLOCK_VERSION)
|
||||||
return state.DoS(100, error("CheckBlockHeader(): block version too low"),REJECT_INVALID, "version-too-low");
|
return state.DoS(100, error("CheckBlockHeader(): block version too low"),REJECT_INVALID, "version-too-low");
|
||||||
|
|||||||
@@ -138,6 +138,8 @@ void TxToJSONExpanded(const CTransaction& tx, const uint256 hashBlock, UniValue&
|
|||||||
else {
|
else {
|
||||||
in.push_back(Pair("txid", txin.prevout.hash.GetHex()));
|
in.push_back(Pair("txid", txin.prevout.hash.GetHex()));
|
||||||
in.push_back(Pair("vout", (int64_t)txin.prevout.n));
|
in.push_back(Pair("vout", (int64_t)txin.prevout.n));
|
||||||
|
|
||||||
|
|
||||||
UniValue o(UniValue::VOBJ);
|
UniValue o(UniValue::VOBJ);
|
||||||
o.push_back(Pair("asm", txin.scriptSig.ToString()));
|
o.push_back(Pair("asm", txin.scriptSig.ToString()));
|
||||||
o.push_back(Pair("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
|
o.push_back(Pair("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
|
||||||
|
|||||||
Reference in New Issue
Block a user