mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 11:13:23 -03:00
Merge #17519: rpc: Remove unused COINBASE_FLAGS
e9a27cf338
refactor: Remove unused COINBASE_FLAGS (Neha Narula) Pull request description: Commitd449772cf6
stopped setting COINBASE_FLAGS, and it looks like it hasn't been used since P2SH. Following up on #17489, remove COINBASE_FLAGS which is unused. I verified that removing this did not change the contents of the coinbase's scriptSig. ACKs for top commit: laanwj: ACKe9a27cf338
MarcoFalke: ACKe9a27cf338
💻 Tree-SHA512: f9dac124ce7e3edcae974137764bb5039387b1b123b86af44486e398aa4a8d91a9ecf640e207b364ae303acbbaee7cca300d303ea3d6869ba9cae2bf555a6334
This commit is contained in:
commit
a739d207a3
4 changed files with 2 additions and 9 deletions
|
@ -435,7 +435,7 @@ void IncrementExtraNonce(CBlock* pblock, const CBlockIndex* pindexPrev, unsigned
|
||||||
++nExtraNonce;
|
++nExtraNonce;
|
||||||
unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2
|
unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2
|
||||||
CMutableTransaction txCoinbase(*pblock->vtx[0]);
|
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);
|
assert(txCoinbase.vin[0].scriptSig.size() <= 100);
|
||||||
|
|
||||||
pblock->vtx[0] = MakeTransactionRef(std::move(txCoinbase));
|
pblock->vtx[0] = MakeTransactionRef(std::move(txCoinbase));
|
||||||
|
|
|
@ -375,9 +375,7 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
|
||||||
" }\n"
|
" }\n"
|
||||||
" ,...\n"
|
" ,...\n"
|
||||||
" ],\n"
|
" ],\n"
|
||||||
" \"coinbaseaux\" : { (json object) data that should be included in the coinbase's scriptSig content\n"
|
" \"coinbaseaux\" : { ... }, (json object) data that should be included in the coinbase's scriptSig content\n"
|
||||||
" \"flags\" : \"xx\" (string) key name is to be ignored, and value included in scriptSig\n"
|
|
||||||
" },\n"
|
|
||||||
" \"coinbasevalue\" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis)\n"
|
" \"coinbasevalue\" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis)\n"
|
||||||
" \"coinbasetxn\" : { ... }, (json object) information for coinbase transaction\n"
|
" \"coinbasetxn\" : { ... }, (json object) information for coinbase transaction\n"
|
||||||
" \"target\" : \"xxxx\", (string) The hash target\n"
|
" \"target\" : \"xxxx\", (string) The hash target\n"
|
||||||
|
@ -607,7 +605,6 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
|
||||||
}
|
}
|
||||||
|
|
||||||
UniValue aux(UniValue::VOBJ);
|
UniValue aux(UniValue::VOBJ);
|
||||||
aux.pushKV("flags", HexStr(COINBASE_FLAGS.begin(), COINBASE_FLAGS.end()));
|
|
||||||
|
|
||||||
arith_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits);
|
arith_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits);
|
||||||
|
|
||||||
|
|
|
@ -129,9 +129,6 @@ CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE);
|
||||||
CBlockPolicyEstimator feeEstimator;
|
CBlockPolicyEstimator feeEstimator;
|
||||||
CTxMemPool mempool(&feeEstimator);
|
CTxMemPool mempool(&feeEstimator);
|
||||||
|
|
||||||
/** Constant stuff for coinbase transactions we create: */
|
|
||||||
CScript COINBASE_FLAGS;
|
|
||||||
|
|
||||||
// Internal stuff
|
// Internal stuff
|
||||||
namespace {
|
namespace {
|
||||||
CBlockIndex* pindexBestInvalid = nullptr;
|
CBlockIndex* pindexBestInvalid = nullptr;
|
||||||
|
|
|
@ -137,7 +137,6 @@ struct BlockHasher
|
||||||
size_t operator()(const uint256& hash) const { return ReadLE64(hash.begin()); }
|
size_t operator()(const uint256& hash) const { return ReadLE64(hash.begin()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CScript COINBASE_FLAGS;
|
|
||||||
extern CCriticalSection cs_main;
|
extern CCriticalSection cs_main;
|
||||||
extern CBlockPolicyEstimator feeEstimator;
|
extern CBlockPolicyEstimator feeEstimator;
|
||||||
extern CTxMemPool mempool;
|
extern CTxMemPool mempool;
|
||||||
|
|
Loading…
Add table
Reference in a new issue