Fix BlockTemplate assignment operator missing Salvium-specific fields

This commit is contained in:
Matt Hess
2026-02-19 16:27:23 +00:00
parent cc960044f6
commit 6efab82426
+6
View File
@@ -61,6 +61,7 @@ BlockTemplate::BlockTemplate(SideChain* sidechain, RandomX_Hasher_Base* hasher)
, m_lastWasDonation(false)
, m_poolBlockTemplate(new PoolBlock())
, m_finalReward(0)
, m_fullBlockReward(0)
, m_minerTxKeccakState{}
, m_minerTxPrefixSize(0)
, m_minerTxKeccakStateInputLength(0)
@@ -136,9 +137,12 @@ BlockTemplate& BlockTemplate::operator=(const BlockTemplate& b)
m_minerTxSize = b.m_minerTxSize;
m_nonceOffset = b.m_nonceOffset;
m_extraNonceOffsetInTemplate = b.m_extraNonceOffsetInTemplate;
m_protocolTxOffsetInTemplate = b.m_protocolTxOffsetInTemplate;
m_protocolTxSize = b.m_protocolTxSize;
m_numTransactionHashes = b.m_numTransactionHashes;
m_prevId = b.m_prevId;
m_height = b.m_height.load();
m_majorVersion = b.m_majorVersion;
m_difficulty = b.m_difficulty;
m_auxDifficulty = b.m_auxDifficulty;
m_seedHash = b.m_seedHash;
@@ -146,7 +150,9 @@ BlockTemplate& BlockTemplate::operator=(const BlockTemplate& b)
m_lastWasDonation = b.m_lastWasDonation;
*m_poolBlockTemplate = *b.m_poolBlockTemplate;
m_finalReward = b.m_finalReward.load();
m_fullBlockReward = b.m_fullBlockReward.load();
m_minerTxPrefixSize = b.m_minerTxPrefixSize;
m_minerTxKeccakState = b.m_minerTxKeccakState;
m_minerTxKeccakStateInputLength = b.m_minerTxKeccakStateInputLength;