@@ -17,7 +17,7 @@ type EdgeId string
17
17
type Commit string
18
18
type OriginId string
19
19
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.
21
21
type Edge struct {
22
22
ID EdgeId
23
23
EdgeType protocol.EdgeType
@@ -71,23 +71,23 @@ func (e *Edge) ComputeMutualId() string {
71
71
)
72
72
}
73
73
74
- // The claim id of the edge, if any
74
+ // ClaimId of the edge, if any
75
75
func (e * Edge ) ClaimId () option.Option [protocol.ClaimId ] {
76
76
if e .ClaimID == "" {
77
77
return option .None [protocol.ClaimId ]()
78
78
}
79
79
return option .Some (protocol .ClaimId (common .BytesToHash ([]byte (e .ClaimID ))))
80
80
}
81
81
82
- // The lower child of the edge, if any.
82
+ // LowerChild of the edge, if any.
83
83
func (e * Edge ) LowerChild (_ context.Context ) (option.Option [protocol.EdgeId ], error ) {
84
84
if e .LowerChildID == "" {
85
85
return option .None [protocol.EdgeId ](), nil
86
86
}
87
87
return option .Some (protocol.EdgeId {Hash : common .BytesToHash ([]byte (e .LowerChildID ))}), nil
88
88
}
89
89
90
- // The upper child of the edge, if any.
90
+ // UpperChild of the edge, if any.
91
91
func (e * Edge ) UpperChild (_ context.Context ) (option.Option [protocol.EdgeId ], error ) {
92
92
if e .UpperChildID == "" {
93
93
return option .None [protocol.EdgeId ](), nil
@@ -99,38 +99,38 @@ func (e *Edge) HasChildren(ctx context.Context) (bool, error) {
99
99
return e .LowerChildID != "" && e .UpperChildID != "" , nil
100
100
}
101
101
102
- // The ministaker of an edge. Only existing for level zero edges.
102
+ // MiniStaker of an edge. Only existing for level zero edges.
103
103
func (* Edge ) MiniStaker () option.Option [common.Address ] {
104
104
return option .None [common.Address ]()
105
105
}
106
106
107
- // The assertion hash of the parent assertion that originated the challenge
107
+ // AssertionHash of the parent assertion that originated the challenge
108
108
// at the top-level.
109
109
func (* Edge ) AssertionHash (_ context.Context ) (protocol.AssertionHash , error ) {
110
110
return protocol.AssertionHash {}, nil
111
111
}
112
112
113
- // The time in seconds an edge has been unrivaled.
113
+ // TimeUnrivaled in seconds an edge has been unrivaled.
114
114
func (* Edge ) TimeUnrivaled (_ context.Context ) (uint64 , error ) {
115
115
return 0 , nil
116
116
}
117
117
118
- // The status of an edge.
118
+ // Status of an edge.
119
119
func (* Edge ) Status (_ context.Context ) (protocol.EdgeStatus , error ) {
120
120
return 0 , nil
121
121
}
122
122
123
- // Whether or not an edge has rivals.
123
+ // HasRival if an edge has rivals.
124
124
func (* Edge ) HasRival (_ context.Context ) (bool , error ) {
125
125
return false , nil
126
126
}
127
127
128
- // Checks if an edge has a length one rival.
128
+ // HasLengthOneRival checks if an edge has a length one rival.
129
129
func (* Edge ) HasLengthOneRival (_ context.Context ) (bool , error ) {
130
130
return false , nil
131
131
}
132
132
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.
134
134
// This is used at subchallenge creation boundaries.
135
135
func (* Edge ) TopLevelClaimHeight (_ context.Context ) (protocol.OriginHeights , error ) {
136
136
return protocol.OriginHeights {}, nil
0 commit comments