MCPcopy Create free account
hub / github.com/LUX-Core/lux / UpdateUncommittedBlockStructures

Function UpdateUncommittedBlockStructures

src/main.cpp:4896–4905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4894}
4895
4896void UpdateUncommittedBlockStructures(CBlock& block, const CBlockIndex* pindexPrev, const Consensus::Params& consensusParams)
4897{
4898 int commitpos = GetWitnessCommitmentIndex(block);
4899 static const std::vector<unsigned char> nonce(32, 0x00);
4900 if (commitpos != -1 && IsWitnessEnabled(pindexPrev, consensusParams) && block.vtx[0].wit.IsEmpty()) {
4901 block.vtx[0].wit.vtxinwit.resize(1);
4902 block.vtx[0].wit.vtxinwit[0].scriptWitness.stack.resize(1);
4903 block.vtx[0].wit.vtxinwit[0].scriptWitness.stack[0] = nonce;
4904 }
4905}
4906
4907std::vector<unsigned char> GenerateCoinbaseCommitment(CBlock& block, const CBlockIndex* pindexPrev, const Consensus::Params& consensusParams, bool fProofOfStake)
4908{

Callers 3

getblocktemplateFunction · 0.85
submitblockFunction · 0.85

Calls 4

IsWitnessEnabledFunction · 0.85
IsEmptyMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected