mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
Merge #15618: refactor: Remove unused function
fa5c511a83
refactor: Remove unused function (MarcoFalke)
Pull request description:
Oversight of kallewoof and mine in https://github.com/bitcoin/bitcoin/pull/13541#discussion_r266555476
Tree-SHA512: 2fd3c4ecde5d3c58b113aa58d606976ceb4998358bde0547ead8e83df210722fa9821d2c88b717bdd190ef71593cd9c0154c3a5d3f2ccc3af8cbf6c36aaa6d45
This commit is contained in:
commit
e45b7f20e6
1 changed files with 0 additions and 20 deletions
|
@ -3159,26 +3159,6 @@ static int GetWitnessCommitmentIndex(const CBlock& block)
|
|||
return commitpos;
|
||||
}
|
||||
|
||||
// Compute at which vout of the block's coinbase transaction the signet
|
||||
// signature occurs, or -1 if not found.
|
||||
static int GetSignetSignatureIndex(const CBlock& block)
|
||||
{
|
||||
if (!block.vtx.empty()) {
|
||||
for (size_t o = 0; o < block.vtx[0]->vout.size(); o++) {
|
||||
if (block.vtx[0]->vout[o].scriptPubKey.size() >= 68 // at minimum 64 byte signature plus script/header data
|
||||
&& block.vtx[0]->vout[o].scriptPubKey[0] == OP_RETURN // unspendable
|
||||
&& block.vtx[0]->vout[o].scriptPubKey[1] == block.vtx[0]->vout[o].scriptPubKey.size() - 1 // push the rest
|
||||
&& block.vtx[0]->vout[o].scriptPubKey[2] == 0xec // 's' ^ 0x9f
|
||||
&& block.vtx[0]->vout[o].scriptPubKey[3] == 0xc7 // 'i' ^ 0xae
|
||||
&& block.vtx[0]->vout[o].scriptPubKey[4] == 0xda // 'g' ^ 0xbd
|
||||
&& block.vtx[0]->vout[o].scriptPubKey[5] == 0xa2) { // 'n' ^ 0xcc
|
||||
return (int)o;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void UpdateUncommittedBlockStructures(CBlock& block, const CBlockIndex* pindexPrev, const Consensus::Params& consensusParams)
|
||||
{
|
||||
int commitpos = GetWitnessCommitmentIndex(block);
|
||||
|
|
Loading…
Reference in a new issue