MCPcopy Create free account
hub / github.com/ElementsProject/elements / DynaFedParams

Class DynaFedParams

src/primitives/block.h:174–200  ·  view source on GitHub ↗

* Encapsulation of the pair of dynamic federations parameters for "current" and "proposed" */

Source from the content-addressed store, hash-verified

172 * Encapsulation of the pair of dynamic federations parameters for "current" and "proposed"
173 */
174class DynaFedParams
175{
176public:
177
178 // Currently enforced by network, not all fields may be known
179 DynaFedParamEntry m_current{};
180 // Proposed rules for next epoch
181 DynaFedParamEntry m_proposed{};
182
183 DynaFedParams() {};
184 DynaFedParams(const DynaFedParamEntry& current, const DynaFedParamEntry& proposed) : m_current(current), m_proposed(proposed) {};
185
186 SERIALIZE_METHODS(DynaFedParams, obj) { READWRITE(obj.m_current, obj.m_proposed); }
187
188 uint256 CalculateRoot() const;
189
190 bool IsNull() const
191 {
192 return m_current.IsNull() && m_proposed.IsNull();
193 }
194
195 void SetNull()
196 {
197 m_current.SetNull();
198 m_proposed.SetNull();
199 }
200};
201
202/** Nodes collect new transactions into a block, hash them into a hash tree,
203 * and scan through nonce values to make the block's hash satisfy proof-of-work

Callers 2

SERIALIZE_METHODSMethod · 0.50
BOOST_AUTO_TEST_CASEFunction · 0.50

Calls

no outgoing calls

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.40