Skip to content

Commit

Permalink
integrate using header proof round
Browse files Browse the repository at this point in the history
  • Loading branch information
ssd04 committed Jan 9, 2025
1 parent b59dea0 commit 7ff31f3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/block/metaBlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,5 +581,6 @@ func (m *MetaBlock) SetPreviousProof(proof data.HeaderProofHandler) {
HeaderEpoch: proof.GetHeaderEpoch(),
HeaderNonce: proof.GetHeaderNonce(),
HeaderShardId: proof.GetHeaderShardId(),
HeaderRound: proof.GetHeaderRound(),
}
}
2 changes: 2 additions & 0 deletions data/block/metaBlock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ func TestMetaBlock2_GetPreviousProof(t *testing.T) {
HeaderEpoch: 123,
HeaderNonce: 234,
HeaderShardId: 0,
HeaderRound: 345,
}

metaBlock.SetPreviousProof(previousProof)
Expand All @@ -428,4 +429,5 @@ func TestMetaBlock2_GetPreviousProof(t *testing.T) {
require.Equal(t, previousProof.HeaderEpoch, proof.GetHeaderEpoch())
require.Equal(t, previousProof.HeaderNonce, proof.GetHeaderNonce())
require.Equal(t, previousProof.HeaderShardId, proof.GetHeaderShardId())
require.Equal(t, previousProof.HeaderRound, proof.GetHeaderRound())
}
1 change: 1 addition & 0 deletions data/block/shardDataHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ func (sd *ShardData) SetPreviousProof(proof data.HeaderProofHandler) error {
HeaderEpoch: proof.GetHeaderEpoch(),
HeaderNonce: proof.GetHeaderNonce(),
HeaderShardId: proof.GetHeaderShardId(),
HeaderRound: proof.GetHeaderRound(),
}

return nil
Expand Down
1 change: 1 addition & 0 deletions data/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ type HeaderProofHandler interface {
GetHeaderEpoch() uint32
GetHeaderNonce() uint64
GetHeaderShardId() uint32
GetHeaderRound() uint64
}

// ShardHeaderHandler defines getters and setters for the shard block header
Expand Down

0 comments on commit 7ff31f3

Please sign in to comment.