Skip to content

Commit

Permalink
chore: use CID in ReportData structure
Browse files Browse the repository at this point in the history
  • Loading branch information
madlabman committed May 10, 2024
1 parent e675a99 commit 80f7d9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/modules/csm/csm.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def build_report(self, blockstamp: ReferenceBlockStamp) -> tuple:
self.CONSENSUS_VERSION,
blockstamp.ref_slot,
tree_root=root,
tree_cid=str(cid),
tree_cid=cid,
distributed=distributed,
).as_tuple()

Expand Down
5 changes: 3 additions & 2 deletions src/modules/csm/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from hexbytes import HexBytes

from src.providers.ipfs import CID
from src.typings import SlotNumber

logger = logging.getLogger(__name__)
Expand All @@ -13,7 +14,7 @@ class ReportData:
consensusVersion: int
ref_slot: SlotNumber
tree_root: HexBytes
tree_cid: str
tree_cid: CID
distributed: int

def as_tuple(self):
Expand All @@ -22,6 +23,6 @@ def as_tuple(self):
self.consensusVersion,
self.ref_slot,
self.tree_root,
self.tree_cid,
str(self.tree_cid),
self.distributed,
)

0 comments on commit 80f7d9e

Please sign in to comment.