Skip to content

Commit a5b5bd8

Browse files
Fix comments (#398)
Co-authored-by: Raul Jordan <[email protected]>
1 parent 856167a commit a5b5bd8

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

chain-abstraction/sol-implementation/assertion_chain_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ func TestLatestCreatedAssertion(t *testing.T) {
353353
var latestAssertionID [32]byte
354354
copy(latestAssertionID[:], expected.Id().Bytes())
355355
var fakeAssertionID [32]byte
356-
copy(fakeAssertionID[:], []byte("fake assertion id as parent"))
356+
copy(fakeAssertionID[:], "fake assertion id as parent")
357357

358358
evtID := abiEvt.ID
359359
validTopics := []common.Hash{evtID, latestAssertionID, fakeAssertionID}

chain-abstraction/sol-implementation/edge_challenge_manager.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ func (cm *specChallengeManager) LevelZeroBlockEdgeHeight(ctx context.Context) (u
419419
return h.Uint64(), nil
420420
}
421421

422-
// Duration of the challenge period in blocks.
422+
// ChallengePeriodBlocks is the duration of the challenge period in blocks.
423423
func (cm *specChallengeManager) ChallengePeriodBlocks(
424424
ctx context.Context,
425425
) (uint64, error) {
@@ -433,7 +433,7 @@ func (cm *specChallengeManager) ChallengePeriodBlocks(
433433
return res.Uint64(), nil
434434
}
435435

436-
// Gets an edge by its hash.
436+
// GetEdge gets an edge by its hash.
437437
func (cm *specChallengeManager) GetEdge(
438438
ctx context.Context,
439439
edgeId protocol.EdgeId,
@@ -474,7 +474,7 @@ func (cm *specChallengeManager) GetEdge(
474474
})), nil
475475
}
476476

477-
// Calculates an edge hash given its challenge id, start history, and end history.
477+
// CalculateEdgeId calculates an edge hash given its challenge id, start history, and end history.
478478
func (cm *specChallengeManager) CalculateEdgeId(
479479
ctx context.Context,
480480
edgeType protocol.EdgeType,

challenge-manager/challenge-tree/mock/edge.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type EdgeId string
1717
type Commit string
1818
type OriginId string
1919

20-
// Mock Edge for challenge tree specific tests, making it easier for test ergonomics.
20+
// Edge for challenge tree specific tests, making it easier for test ergonomics.
2121
type Edge struct {
2222
ID EdgeId
2323
EdgeType protocol.EdgeType
@@ -71,23 +71,23 @@ func (e *Edge) ComputeMutualId() string {
7171
)
7272
}
7373

74-
// The claim id of the edge, if any
74+
// ClaimId of the edge, if any
7575
func (e *Edge) ClaimId() option.Option[protocol.ClaimId] {
7676
if e.ClaimID == "" {
7777
return option.None[protocol.ClaimId]()
7878
}
7979
return option.Some(protocol.ClaimId(common.BytesToHash([]byte(e.ClaimID))))
8080
}
8181

82-
// The lower child of the edge, if any.
82+
// LowerChild of the edge, if any.
8383
func (e *Edge) LowerChild(_ context.Context) (option.Option[protocol.EdgeId], error) {
8484
if e.LowerChildID == "" {
8585
return option.None[protocol.EdgeId](), nil
8686
}
8787
return option.Some(protocol.EdgeId{Hash: common.BytesToHash([]byte(e.LowerChildID))}), nil
8888
}
8989

90-
// The upper child of the edge, if any.
90+
// UpperChild of the edge, if any.
9191
func (e *Edge) UpperChild(_ context.Context) (option.Option[protocol.EdgeId], error) {
9292
if e.UpperChildID == "" {
9393
return option.None[protocol.EdgeId](), nil
@@ -99,38 +99,38 @@ func (e *Edge) HasChildren(ctx context.Context) (bool, error) {
9999
return e.LowerChildID != "" && e.UpperChildID != "", nil
100100
}
101101

102-
// The ministaker of an edge. Only existing for level zero edges.
102+
// MiniStaker of an edge. Only existing for level zero edges.
103103
func (*Edge) MiniStaker() option.Option[common.Address] {
104104
return option.None[common.Address]()
105105
}
106106

107-
// The assertion hash of the parent assertion that originated the challenge
107+
// AssertionHash of the parent assertion that originated the challenge
108108
// at the top-level.
109109
func (*Edge) AssertionHash(_ context.Context) (protocol.AssertionHash, error) {
110110
return protocol.AssertionHash{}, nil
111111
}
112112

113-
// The time in seconds an edge has been unrivaled.
113+
// TimeUnrivaled in seconds an edge has been unrivaled.
114114
func (*Edge) TimeUnrivaled(_ context.Context) (uint64, error) {
115115
return 0, nil
116116
}
117117

118-
// The status of an edge.
118+
// Status of an edge.
119119
func (*Edge) Status(_ context.Context) (protocol.EdgeStatus, error) {
120120
return 0, nil
121121
}
122122

123-
// Whether or not an edge has rivals.
123+
// HasRival if an edge has rivals.
124124
func (*Edge) HasRival(_ context.Context) (bool, error) {
125125
return false, nil
126126
}
127127

128-
// Checks if an edge has a length one rival.
128+
// HasLengthOneRival checks if an edge has a length one rival.
129129
func (*Edge) HasLengthOneRival(_ context.Context) (bool, error) {
130130
return false, nil
131131
}
132132

133-
// The history commitment for the top-level edge the current edge's challenge is made upon.
133+
// TopLevelClaimHeight for the top-level edge the current edge's challenge is made upon.
134134
// This is used at subchallenge creation boundaries.
135135
func (*Edge) TopLevelClaimHeight(_ context.Context) (protocol.OriginHeights, error) {
136136
return protocol.OriginHeights{}, nil

0 commit comments

Comments
 (0)