Skip to content

Commit 3298693

Browse files
committed
nits
1 parent 3a0aa18 commit 3298693

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

vms/platformvm/block/builder/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func (b *builder) buildBlock() (block.Block, error) {
130130

131131
timestamp, timeWasCapped, err := txexecutor.NextBlockTime(preferredState, b.txExecutorBackend.Clk)
132132
if err != nil {
133-
return nil, err
133+
return nil, fmt.Errorf("could not calculate next staker change time: %w", err)
134134
}
135135

136136
return buildBlock(

vms/platformvm/state/state.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ func (s *state) loadCurrentValidators() error {
14471447
}
14481448
tx, _, err := s.GetTx(txID)
14491449
if err != nil {
1450-
return fmt.Errorf("failed loading validator transaction txID %v, %w", txID, err)
1450+
return err
14511451
}
14521452

14531453
stakerTx, ok := tx.Unsigned.(txs.Staker)

vms/platformvm/txs/executor/standard_tx_executor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ func (e *StandardTxExecutor) BaseTx(tx *txs.BaseTx) error {
533533
return nil
534534
}
535535

536-
// putStaker creates the staker and adds it to state.
536+
// Creates the staker as defined in [stakerTx] and adds it to [e.State].
537537
func (e *StandardTxExecutor) putStaker(stakerTx txs.Staker) error {
538538
txID := e.Tx.ID()
539539
staker, err := state.NewPendingStaker(txID, stakerTx)

vms/platformvm/txs/executor/tx_mempool_verifier.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package executor
55

66
import (
77
"errors"
8-
"fmt"
98
"time"
109

1110
"github.com/ava-labs/avalanchego/ids"
@@ -136,7 +135,7 @@ func NextBlockTime(state state.Chain, clk *mockable.Clock) (time.Time, bool, err
136135

137136
nextStakerChangeTime, err := GetNextStakerChangeTime(state)
138137
if err != nil {
139-
return time.Time{}, false, fmt.Errorf("could not calculate next staker change time: %w", err)
138+
return time.Time{}, false, err
140139
}
141140

142141
// timeWasCapped means that [timestamp] was reduced to

0 commit comments

Comments
 (0)