Skip to content

Commit 8da9e1e

Browse files
authored
docs: fix inverted comments in BoldMachine methods (#3980)
1 parent ef01ed5 commit 8da9e1e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

validator/server_arb/bold_machine.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ func (m *BoldMachine) GetStepCount() uint64 {
5353
return m.inner.GetStepCount() + 1
5454
}
5555

56-
// Hash returns the hash of the inner machine if the machine has not stepped,
57-
// otherwise it returns the hash of the zeroth step machine.
56+
// Hash returns the hash of the zeroth step machine if the machine has not stepped,
57+
// otherwise it returns the hash of the inner machine.
5858
func (m *BoldMachine) Hash() common.Hash {
5959
if !m.hasStepped {
6060
return m.zeroMachine.Hash()
@@ -74,8 +74,8 @@ func (m *BoldMachine) Freeze() {
7474
m.zeroMachine.Freeze()
7575
}
7676

77-
// Status returns the status of the inner machine if the machine has not
78-
// stepped, otherwise it returns the status of the zeroth step machine.
77+
// Status returns the status of the zeroth step machine if the machine has not
78+
// stepped, otherwise it returns the status of the inner machine.
7979
func (m *BoldMachine) Status() uint8 {
8080
if !m.hasStepped {
8181
return m.zeroMachine.Status()
@@ -101,8 +101,8 @@ func (m *BoldMachine) IsErrored() bool {
101101
return m.inner.IsErrored()
102102
}
103103

104-
// Step steps the inner machine if the machine has not stepped, otherwise it
105-
// steps the zeroth step machine.
104+
// Step steps the inner machine. If the machine has not yet stepped, the first
105+
// step is consumed to transition from the zeroth step, and remaining steps are applied.
106106
func (m *BoldMachine) Step(ctx context.Context, steps uint64) error {
107107
if !m.hasStepped {
108108
if steps == 0 {

0 commit comments

Comments
 (0)