Skip to content

Commit

Permalink
refactor: Remove unused COINBASE_FLAGS
Browse files Browse the repository at this point in the history
Commit d449772 stopped setting
COINBASE_FLAGS, and it looks like it hasn't been used since P2SH.
  • Loading branch information
narula committed Nov 19, 2019
1 parent b4a1da9 commit 9aedabe
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ void IncrementExtraNonce(CBlock* pblock, const CBlockIndex* pindexPrev, unsigned
++nExtraNonce;
unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2
CMutableTransaction txCoinbase(*pblock->vtx[0]);
txCoinbase.vin[0].scriptSig = (CScript() << nHeight << CScriptNum(nExtraNonce)) + COINBASE_FLAGS;
txCoinbase.vin[0].scriptSig = (CScript() << nHeight << CScriptNum(nExtraNonce));
assert(txCoinbase.vin[0].scriptSig.size() <= 100);

pblock->vtx[0] = MakeTransactionRef(std::move(txCoinbase));
Expand Down
1 change: 0 additions & 1 deletion src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
}

UniValue aux(UniValue::VOBJ);
aux.pushKV("flags", HexStr(COINBASE_FLAGS.begin(), COINBASE_FLAGS.end()));

arith_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits);

Expand Down
3 changes: 0 additions & 3 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE);
CBlockPolicyEstimator feeEstimator;
CTxMemPool mempool(&feeEstimator);

/** Constant stuff for coinbase transactions we create: */
CScript COINBASE_FLAGS;

// Internal stuff
namespace {
CBlockIndex* pindexBestInvalid = nullptr;
Expand Down
1 change: 0 additions & 1 deletion src/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ struct BlockHasher
size_t operator()(const uint256& hash) const { return ReadLE64(hash.begin()); }
};

extern CScript COINBASE_FLAGS;
extern CCriticalSection cs_main;
extern CBlockPolicyEstimator feeEstimator;
extern CTxMemPool mempool;
Expand Down

0 comments on commit 9aedabe

Please sign in to comment.