diff --git a/app/node/node.go b/app/node/node.go index a1582e8401..cd09fd0da3 100644 --- a/app/node/node.go +++ b/app/node/node.go @@ -326,7 +326,7 @@ func (node *Node) RunRPCAndWait(ctx context.Context, rootCmdDaemon *cmds.Command terminate := make(chan error, 1) - // todo: design an genterfull + // todo: design a graceful memguard.CatchSignal(func(signal os.Signal) { log.Infof("received signal(%s), venus will shutdown...", signal.String()) log.Infof("shutting down server...") diff --git a/app/submodule/mpool/mpool_api.go b/app/submodule/mpool/mpool_api.go index 98b6efb5f3..187e65f1fc 100644 --- a/app/submodule/mpool/mpool_api.go +++ b/app/submodule/mpool/mpool_api.go @@ -258,7 +258,7 @@ func (a *MessagePoolAPI) MpoolPushMessage(ctx context.Context, msg *types.Messag }) } -// MpoolBatchPush batch pushes a unsigned message to mempool. +// MpoolBatchPush batch pushes an unsigned message to mempool. func (a *MessagePoolAPI) MpoolBatchPush(ctx context.Context, smsgs []*types.SignedMessage) ([]cid.Cid, error) { var messageCids []cid.Cid for _, smsg := range smsgs { @@ -292,7 +292,7 @@ func (a *MessagePoolAPI) MpoolBatchPushUntrusted(ctx context.Context, smsgs []*t return messageCids, nil } -// MpoolBatchPushMessage batch pushes a unsigned message to mempool. +// MpoolBatchPushMessage batch pushes an unsigned message to mempool. func (a *MessagePoolAPI) MpoolBatchPushMessage(ctx context.Context, msgs []*types.Message, spec *types.MessageSendSpec) ([]*types.SignedMessage, error) { var smsgs []*types.SignedMessage for _, msg := range msgs { diff --git a/cmd/import.go b/cmd/import.go index b90d38485f..c7e8d30bec 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -63,7 +63,7 @@ func importChain(ctx context.Context, r repo.Repo, network string, fname string) } bs := r.Datastore() - // setup a ipldCbor on top of the local store + // setup an ipldCbor on top of the local store chainStore := chain.NewStore(r.ChainDatastore(), bs, cid.Undef, chainselector.Weight) bufr := bufio.NewReaderSize(rd, 1<<20) diff --git a/pkg/chain/randomness.go b/pkg/chain/randomness.go index 812e058d08..8c30c4d6df 100644 --- a/pkg/chain/randomness.go +++ b/pkg/chain/randomness.go @@ -119,7 +119,7 @@ func (c *ChainRandomnessSource) GetBeaconRandomnessTipset(ctx context.Context, r // If `head` is empty (as when processing the pre-genesis state or the genesis block), the seed derived from // a fixed genesis ticket. // Note that this may produce the same value for different, neighbouring epochs when the epoch references a round -// in which no blocks were produced (an empty tipset or "null block"). A caller desiring a unique see for each epoch +// in which no blocks were produced (an empty tipset or "null block"). A caller desiring a unique seed for each epoch // should blend in some distinguishing value (such as the epoch itself) into a hash of this ticket. func (c *ChainRandomnessSource) getChainRandomness(ctx context.Context, epoch abi.ChainEpoch, lookback bool) (types.Ticket, error) { if !c.head.IsEmpty() { diff --git a/pkg/util/ffiwrapper/impl/partialfile.go b/pkg/util/ffiwrapper/impl/partialfile.go index 62aa8648b7..3a62da3b15 100644 --- a/pkg/util/ffiwrapper/impl/partialfile.go +++ b/pkg/util/ffiwrapper/impl/partialfile.go @@ -23,7 +23,7 @@ const veryLargeRle = 1 << 20 // in a sector are unsealed, and which are not (holes) // unsealed sector files internally have this structure -// [unpadded (raw) data][rle+][4B LE length fo the rle+ field] +// [unpadded (raw) data][rle+][4B LE length of the rle+ field] type partialFile struct { maxPiece abi.PaddedPieceSize diff --git a/venus-shared/types/wallet/sign_types.go b/venus-shared/types/wallet/sign_types.go index e69b525ab7..f29c0f84bb 100644 --- a/venus-shared/types/wallet/sign_types.go +++ b/venus-shared/types/wallet/sign_types.go @@ -224,7 +224,7 @@ func GetSignBytesAndObj(toSign []byte, meta types.MsgMeta) (interface{}, []byte, func CborDecodeInto(r []byte, v interface{}) error { unmarshaler, isOk := v.(cbor.Unmarshaler) if !isOk { - return fmt.Errorf("not an 'unmarhsaler'") + return fmt.Errorf("not an 'unmarshaler'") } if err := unmarshaler.UnmarshalCBOR(bytes.NewReader(r)); err != nil { return fmt.Errorf("cbor unmarshal:%w", err)