Skip to content

Commit fa607c2

Browse files
author
MarcoFalke
committed
validation: Make GetWitnessCommitmentIndex public
1 parent 3ce8298 commit fa607c2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/validation.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3280,9 +3280,7 @@ bool IsWitnessEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& pa
32803280
return (height >= params.SegwitHeight);
32813281
}
32823282

3283-
// Compute at which vout of the block's coinbase transaction the witness
3284-
// commitment occurs, or -1 if not found.
3285-
static int GetWitnessCommitmentIndex(const CBlock& block)
3283+
int GetWitnessCommitmentIndex(const CBlock& block)
32863284
{
32873285
int commitpos = -1;
32883286
if (!block.vtx.empty()) {

src/validation.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,9 @@ bool IsWitnessEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& pa
384384
/** When there are blocks in the active chain with missing data, rewind the chainstate and remove them from the block index */
385385
bool RewindBlockIndex(const CChainParams& params) LOCKS_EXCLUDED(cs_main);
386386

387+
/** Compute at which vout of the block's coinbase transaction the witness commitment occurs, or -1 if not found */
388+
int GetWitnessCommitmentIndex(const CBlock& block);
389+
387390
/** Update uncommitted block structures (currently: only the witness reserved value). This is safe for submitted blocks. */
388391
void UpdateUncommittedBlockStructures(CBlock& block, const CBlockIndex* pindexPrev, const Consensus::Params& consensusParams);
389392

0 commit comments

Comments
 (0)