Skip to content

Commit

Permalink
backports: Use GetAdjustedTime() as nTimeTx for V2+ transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
lateminer committed Apr 29, 2024
1 parent f78479c commit 491422d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,9 +1226,9 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
return state.DoS(0, false, REJECT_INVALID, "too many dust vouts");
}

// Blackcoin: in v2 transactions use GetAdjustedTime() as TxTime
// Blackcoin: in v2 transactions use GetAdjustedTime() as nTimeTx
int64_t nTimeTx = (int64_t)tx.nTime;
if (!nTimeTx && tx.nVersion >= CTransaction::MAX_STANDARD_VERSION)
if (!nTimeTx && tx.nVersion >= 2)
nTimeTx = GetAdjustedTime();

if (!CheckTransaction(tx, state))
Expand Down Expand Up @@ -1999,9 +1999,9 @@ bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoins
if (!inputs.HaveInputs(tx))
return state.Invalid(false, 0, "", "Inputs unavailable");

// Blackcoin: in v2 transactions use GetAdjustedTime() as TxTime
// Blackcoin: in v2 transactions use GetAdjustedTime() as nTimeTx
int64_t nTimeTx = tx.nTime;
if (!nTimeTx && tx.nVersion >= CTransaction::MAX_STANDARD_VERSION)
if (!nTimeTx && tx.nVersion >= 2)
nTimeTx = GetAdjustedTime();

CAmount nValueIn = 0;
Expand Down

0 comments on commit 491422d

Please sign in to comment.