From 06c9c9743db7d188e61fa82d3f79f1ab5b41452b Mon Sep 17 00:00:00 2001 From: petercover Date: Wed, 22 Jan 2025 23:31:36 +0800 Subject: [PATCH] chore: fix some comments Signed-off-by: petercover --- api/api_full.go | 2 +- cli/mocks_test.go | 2 +- itests/splitstore_test.go | 6 +++--- storage/pipeline/fsm.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/api_full.go b/api/api_full.go index 5d751379be2..549ef3aff7a 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -1164,7 +1164,7 @@ type ChannelAvailableFunds struct { // QueuedAmt is the amount that is queued up behind a pending request QueuedAmt types.BigInt - // VoucherRedeemedAmt is the amount that is redeemed by vouchers on-chain + // VoucherReedeemedAmt is the amount that is redeemed by vouchers on-chain // and in the local datastore VoucherReedeemedAmt types.BigInt } diff --git a/cli/mocks_test.go b/cli/mocks_test.go index e4489c5eeea..acb2820630b 100644 --- a/cli/mocks_test.go +++ b/cli/mocks_test.go @@ -11,7 +11,7 @@ import ( "github.com/filecoin-project/lotus/api/mocks" ) -// newMockAppWithFullAPI returns a gomock-ed CLI app used for unit tests +// NewMockAppWithFullAPI returns a gomock-ed CLI app used for unit tests // see cli/util/api.go:GetFullNodeAPI for mock API injection func NewMockAppWithFullAPI(t *testing.T, cmd *ucli.Command) (*ucli.App, *mocks.MockFullNode, *bytes.Buffer, func()) { app := ucli.NewApp() diff --git a/itests/splitstore_test.go b/itests/splitstore_test.go index 466adaf0012..677ea9de078 100644 --- a/itests/splitstore_test.go +++ b/itests/splitstore_test.go @@ -386,7 +386,7 @@ func NewGarbager(ctx context.Context, t *testing.T, n *kit.TestFullNode) *Garbag return g } -// drop returns the cid referencing the dropped garbage and the chain epoch of the drop +// Drop returns the cid referencing the dropped garbage and the chain epoch of the drop func (g *Garbager) Drop(ctx context.Context) (cid.Cid, abi.ChainEpoch) { // record existing with mInfoCidAtEpoch c := g.mInfoCid(ctx) @@ -397,13 +397,13 @@ func (g *Garbager) Drop(ctx context.Context) (cid.Cid, abi.ChainEpoch) { return c, g.newPeerID(ctx) } -// message returns the cid referencing a message and the chain epoch it went on chain +// Message returns the cid referencing a message and the chain epoch it went on chain func (g *Garbager) Message(ctx context.Context) (cid.Cid, abi.ChainEpoch) { mw := g.createMiner(ctx) return mw.Message, mw.Height } -// exists checks whether the cid is reachable through the node +// Exists checks whether the cid is reachable through the node func (g *Garbager) Exists(ctx context.Context, c cid.Cid) bool { // check chain get / blockstore get _, err := g.node.ChainReadObj(ctx, c) diff --git a/storage/pipeline/fsm.go b/storage/pipeline/fsm.go index 55913b27994..831c182a0b8 100644 --- a/storage/pipeline/fsm.go +++ b/storage/pipeline/fsm.go @@ -847,7 +847,7 @@ func planOne(ts ...func() (mut mutator, next func(*SectorInfo) (more bool, err e } } -// planOne but ignores unhandled states without erroring, this prevents the need to handle all possible events creating +// planOneOrIgnore but ignores unhandled states without erroring, this prevents the need to handle all possible events creating // error during forced override func planOneOrIgnore(ts ...func() (mut mutator, next func(*SectorInfo) (more bool, err error))) func(events []statemachine.Event, state *SectorInfo) (uint64, error) { f := planOne(ts...)