mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Miner should stop trying to account for old PAK system
This commit is contained in:
parent
0e10287f7a
commit
4c00eb4084
1 changed files with 0 additions and 22 deletions
|
|
@ -115,22 +115,6 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
|
|||
return nullptr;
|
||||
pblock = &pblocktemplate->block; // pointer for convenience
|
||||
|
||||
std::vector<CScript> commitments;
|
||||
|
||||
// ELEMENTS: PAK
|
||||
// Create block pak commitment if set in conf file and validating pegouts
|
||||
if (Params().GetEnforcePak() && g_paklist_config) {
|
||||
if (*g_paklist_config != g_paklist_blockchain) {
|
||||
g_paklist_config->CreateCommitments(commitments);
|
||||
}
|
||||
}
|
||||
|
||||
// Pad block weight to account for OP_RETURN commitments with two compressed pubkeys
|
||||
for (const auto& commitment : commitments) {
|
||||
CTxOut output(CAsset(), 0, commitment);
|
||||
nBlockWeight += ::GetSerializeSize(output, PROTOCOL_VERSION)*WITNESS_SCALE_FACTOR;
|
||||
}
|
||||
// END PAK
|
||||
|
||||
// Add dummy coinbase tx as first transaction
|
||||
pblock->vtx.emplace_back();
|
||||
|
|
@ -211,12 +195,6 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
|
|||
}
|
||||
}
|
||||
coinbaseTx.vin[0].scriptSig = CScript() << nHeight << OP_0;
|
||||
// ELEMENTS: PAK
|
||||
// Add PAK transition commitments
|
||||
for (unsigned int i = 0; i < commitments.size(); i++) {
|
||||
coinbaseTx.vout.push_back(CTxOut(CAsset(), 0, commitments[i]));
|
||||
}
|
||||
// END PAK
|
||||
pblock->vtx[0] = MakeTransactionRef(std::move(coinbaseTx));
|
||||
pblocktemplate->vchCoinbaseCommitment = GenerateCoinbaseCommitment(*pblock, pindexPrev, chainparams.GetConsensus());
|
||||
pblocktemplate->vTxFees[0] = -nFees;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue