Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary call to CTransaction::IsCoinBase() #16103

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/validation.cpp
Expand Up @@ -1979,7 +1979,7 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl

nInputs += tx.vin.size();

if (!tx.IsCoinBase())
if (i > 0) // !tx.IsCoinBase()
{
CAmount txfee = 0;
if (!Consensus::CheckTxInputs(tx, state, view, pindex->nHeight, txfee)) {
Expand Down Expand Up @@ -2023,7 +2023,7 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl
REJECT_INVALID, "bad-blk-sigops");

txdata.emplace_back(tx);
if (!tx.IsCoinBase())
if (i > 0) // !tx.IsCoinBase()
{
std::vector<CScriptCheck> vChecks;
bool fCacheResults = fJustCheck; /* Don't cache results if we're actually connecting blocks (still consult the cache, though) */
Expand Down