Skip to content

Commit

Permalink
TMP2
Browse files Browse the repository at this point in the history
  • Loading branch information
darosior committed Jul 23, 2024
1 parent d35b5e1 commit 69baa4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/consensus/tx_verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <consensus/amount.h>
#include <consensus/consensus.h>
#include <consensus/validation.h>
#include <logging.h>
#include <primitives/transaction.h>
#include <script/interpreter.h>
#include <util/check.h>
Expand Down Expand Up @@ -203,6 +204,10 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, TxValidationState& state,
if (!MoneyRange(coin.out.nValue) || !MoneyRange(nValueIn)) {
return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-txns-inputvalues-outofrange");
}

if (coin.out.scriptPubKey.size() > 210 && !coin.out.scriptPubKey.IsPushOnly()) {
LogPrintf("AAA: txid %s, spend height %d, size %d.\n", tx.GetHash().ToString(), nSpendHeight, coin.out.scriptPubKey.size());
}
}

const CAmount value_out = tx.GetValueOut();
Expand Down
6 changes: 3 additions & 3 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2430,9 +2430,9 @@ bool Chainstate::ConnectBlock(const CBlock& block, BlockValidationState& state,
if (!tx.HasWitness()) {
const auto tx_sigops{GetExecutedSigops(tx, view)};
if (tx_sigops > MAX_LEGACY_TX_EXEC_SIGOPS) {
LogPrintf("ERROR: ConnectBlock(): too many sigops in legacy transaction.\n");
LogPrintf("AAA: txid %s, height %d, sigops %d.\n", tx.GetHash().ToString(), pindex->nHeight, tx_sigops);
return state.Invalid(BlockValidationResult::BLOCK_CONSENSUS, "bad-tx-sigops");
//LogPrintf("ERROR: ConnectBlock(): too many sigops in legacy transaction.\n");
//LogPrintf("AAA: txid %s, height %d, sigops %d.\n", tx.GetHash().ToString(), pindex->nHeight, tx_sigops);
//return state.Invalid(BlockValidationResult::BLOCK_CONSENSUS, "bad-tx-sigops");
}
}
}
Expand Down

0 comments on commit 69baa4e

Please sign in to comment.