diff --git a/src/modules/accounting/accounting.py b/src/modules/accounting/accounting.py index b283d96a7..eacf337e7 100644 --- a/src/modules/accounting/accounting.py +++ b/src/modules/accounting/accounting.py @@ -167,7 +167,7 @@ def _get_processing_state(self, blockstamp: BlockStamp) -> AccountingProcessingS # ---------------------------------------- Build report ---------------------------------------- def _calculate_report(self, blockstamp: ReferenceBlockStamp): - consensus_version = self.report_contract.get_consensus_version(blockstamp.block_hash) + consensus_version = self.get_consensus_version(blockstamp) logger.info({'msg': 'Building the report', 'consensus_version': consensus_version}) rebase_part = self._calculate_rebase_report(blockstamp) modules_part = self._get_newly_exited_validators_by_modules(blockstamp) diff --git a/src/modules/csm/csm.py b/src/modules/csm/csm.py index 93c29e0b9..f4b7b0502 100644 --- a/src/modules/csm/csm.py +++ b/src/modules/csm/csm.py @@ -112,7 +112,7 @@ def build_report(self, blockstamp: ReferenceBlockStamp) -> tuple: if not distributed and not shares: logger.info({"msg": "No shares distributed in the current frame"}) return ReportData( - self.report_contract.get_consensus_version(blockstamp.block_hash), + self.get_consensus_version(blockstamp), blockstamp.ref_slot, tree_root=prev_root, tree_cid=prev_cid or "", @@ -131,7 +131,7 @@ def build_report(self, blockstamp: ReferenceBlockStamp) -> tuple: tree_cid = self.publish_tree(tree) return ReportData( - self.report_contract.get_consensus_version(blockstamp.block_hash), + self.get_consensus_version(blockstamp), blockstamp.ref_slot, tree_root=tree.root, tree_cid=tree_cid, diff --git a/src/modules/ejector/ejector.py b/src/modules/ejector/ejector.py index 0aa7a728c..d7336d09b 100644 --- a/src/modules/ejector/ejector.py +++ b/src/modules/ejector/ejector.py @@ -104,7 +104,7 @@ def build_report(self, blockstamp: ReferenceBlockStamp) -> tuple: data, data_format = encode_data(validators) report_data = ReportData( - self.report_contract.get_consensus_version(blockstamp.block_hash), + self.get_consensus_version(blockstamp), blockstamp.ref_slot, len(validators), data_format, diff --git a/src/modules/submodules/consensus.py b/src/modules/submodules/consensus.py index 29807c1ad..631091093 100644 --- a/src/modules/submodules/consensus.py +++ b/src/modules/submodules/consensus.py @@ -296,7 +296,7 @@ def _process_report_hash(self, blockstamp: ReferenceBlockStamp, report_hash: Hex logger.info({'msg': 'Consensus reached with provided hash.'}) return None - consensus_version = self.report_contract.get_consensus_version(blockstamp.block_hash) + consensus_version = self.get_consensus_version(blockstamp) logger.info({'msg': f'Send report hash. Consensus version: [{consensus_version}]'}) self._send_report_hash(blockstamp, report_hash, consensus_version)