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:
Wladimir J. van der Laan 2019-03-18 20:06:04 +01:00
commit e45b7f20e6
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D

View file

@ -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);