Skip to content
Permalink
Browse files

Merge #15618: refactor: Remove unused function

fa5c511 refactor: Remove unused function (MarcoFalke)

Pull request description:

  Oversight of kallewoof and mine in #13541 (comment)

Tree-SHA512: 2fd3c4ecde5d3c58b113aa58d606976ceb4998358bde0547ead8e83df210722fa9821d2c88b717bdd190ef71593cd9c0154c3a5d3f2ccc3af8cbf6c36aaa6d45
  • Loading branch information...
laanwj committed Mar 18, 2019
2 parents c033c4b + fa5c511 commit e45b7f20e651898c5b476c2364fd9d1fd583f3af
Showing with 0 additions and 20 deletions.
  1. +0 −20 src/validation.cpp
@@ -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);

0 comments on commit e45b7f2

Please sign in to comment.
You can’t perform that action at this time.