* Encapsulation of the pair of dynamic federations parameters for "current" and "proposed" */
| 172 | * Encapsulation of the pair of dynamic federations parameters for "current" and "proposed" |
| 173 | */ |
| 174 | class DynaFedParams |
| 175 | { |
| 176 | public: |
| 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 |
no outgoing calls