* documentation text corrections

* Text corrections in go files

* make docsgen-cli
This commit is contained in:
Alejandro Criado-Pérez 2023-10-27 20:32:42 +02:00 committed by GitHub
parent 368278b19c
commit b6a77dfafc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 36 additions and 36 deletions

View File

@ -72,7 +72,7 @@ func (s *state{{.v}}) AvailableBalance(bal abi.TokenAmount) (available abi.Token
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available{{if (ge .v 2)}}, err{{end}} = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -62,7 +62,7 @@ func (s *state0) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmoun
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -62,7 +62,7 @@ func (s *state10) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmou
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available, err = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -62,7 +62,7 @@ func (s *state11) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmou
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available, err = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -62,7 +62,7 @@ func (s *state12) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmou
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available, err = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -61,7 +61,7 @@ func (s *state2) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmoun
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available, err = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -62,7 +62,7 @@ func (s *state3) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmoun
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available, err = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -62,7 +62,7 @@ func (s *state4) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmoun
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available, err = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -62,7 +62,7 @@ func (s *state5) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmoun
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available, err = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -62,7 +62,7 @@ func (s *state6) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmoun
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available, err = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -62,7 +62,7 @@ func (s *state7) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmoun
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available, err = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -62,7 +62,7 @@ func (s *state8) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmoun
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available, err = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -62,7 +62,7 @@ func (s *state9) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmoun
available = abi.NewTokenAmount(0)
}
}()
// this panics if the miner doesnt have enough funds to cover their locked pledge
// this panics if the miner doesn't have enough funds to cover their locked pledge
available, err = s.GetAvailableBalance(bal)
return available, err
}

View File

@ -29,7 +29,7 @@ import (
"github.com/filecoin-project/lotus/chain/types"
)
// Load returns an abstract copy of payment channel state, irregardless of actor version
// Load returns an abstract copy of payment channel state, regardless of actor version
func Load(store adt.Store, act *types.Actor) (State, error) {
if name, av, ok := actors.GetActorMetaByCode(act.Code); ok {
if name != manifest.PaychKey {

View File

@ -29,7 +29,7 @@ import (
"github.com/filecoin-project/lotus/chain/types"
)
// Load returns an abstract copy of payment channel state, irregardless of actor version
// Load returns an abstract copy of payment channel state, regardless of actor version
func Load(store adt.Store, act *types.Actor) (State, error) {
if name, av, ok := actors.GetActorMetaByCode(act.Code); ok {
if name != manifest.PaychKey {

View File

@ -13,7 +13,7 @@ import (
func SerializeParams(i cbg.CBORMarshaler) ([]byte, aerrors.ActorError) {
buf := new(bytes.Buffer)
if err := i.MarshalCBOR(buf); err != nil {
// TODO: shouldnt this be a fatal error?
// TODO: shouldn't this be a fatal error?
return nil, aerrors.Absorb(err, exitcode.ErrSerialization, "failed to encode parameter")
}
return buf.Bytes(), nil

View File

@ -180,7 +180,7 @@ func (e *heightEventsObserver) Revert(ctx context.Context, from, to *types.TipSe
// Update the head first so we don't accidental skip reverting a concurrent call to ChainAt.
e.updateHead(to)
// Call revert on all hights between the two tipsets, handling empty tipsets.
// Call revert on all heights between the two tipsets, handling empty tipsets.
for h := from.Height(); h > to.Height(); h-- {
e.lk.Lock()
triggers := e.tsHeights[h]

View File

@ -673,7 +673,7 @@ func TestCalled(t *testing.T) {
}, 3, 20, matchAddrMethod(t0123, 5))
require.NoError(t, err)
// create few blocks to make sure nothing get's randomly called
// create few blocks to make sure nothing gets randomly called
fcs.advance(0, 4, 0, nil) // H=5
require.Equal(t, false, applied)
@ -991,7 +991,7 @@ func TestCalledNull(t *testing.T) {
}, 3, 20, matchAddrMethod(t0123, 5))
require.NoError(t, err)
// create few blocks to make sure nothing get's randomly called
// create few blocks to make sure nothing gets randomly called
fcs.advance(0, 4, 0, nil) // H=5
require.Equal(t, false, applied)
@ -1050,7 +1050,7 @@ func TestRemoveTriggersOnMessage(t *testing.T) {
}, 3, 20, matchAddrMethod(t0123, 5))
require.NoError(t, err)
// create few blocks to make sure nothing get's randomly called
// create few blocks to make sure nothing gets randomly called
fcs.advance(0, 4, 0, nil) // H=5
require.Equal(t, false, applied)
@ -1155,7 +1155,7 @@ func TestStateChanged(t *testing.T) {
})
require.NoError(t, err)
// create few blocks to make sure nothing get's randomly called
// create few blocks to make sure nothing gets randomly called
fcs.advance(0, 4, 0, nil) // H=5
require.Equal(t, false, applied)

View File

@ -242,7 +242,7 @@ func (c *client) processResponse(req *Request, res *Response, tipsets []*types.T
// If we didn't request the headers they should have been provided
// by the caller.
if len(tipsets) < len(res.Chain) {
return nil, xerrors.Errorf("not enought tipsets provided for message response validation, needed %d, have %d", len(res.Chain), len(tipsets))
return nil, xerrors.Errorf("not enough tipsets provided for message response validation, needed %d, have %d", len(res.Chain), len(tipsets))
}
chain := make([]*BSTipSet, 0, resLength)
for i, resChain := range res.Chain {

View File

@ -131,7 +131,7 @@ func NewMsgIndex(lctx context.Context, basePath string, cs ChainStore) (MsgIndex
db, err := sql.Open("sqlite3", dbPath)
if err != nil {
// TODO [nice to have]: automaticaly delete corrupt databases
// TODO [nice to have]: automatically delete corrupt databases
// but for now we can just error and let the operator delete.
return nil, xerrors.Errorf("error opening msgindex database: %w", err)
}

View File

@ -570,7 +570,7 @@ func (st *StateTree) ForEach(f func(address.Address, *types.Actor) error) error
}
// no need to record anything here, there are no duplicates in the actors HAMT
// iself.
// itself.
if _, ok := seen[addr]; ok {
return nil
}
@ -588,7 +588,7 @@ func (st *StateTree) ForEach(f func(address.Address, *types.Actor) error) error
}
// no need to record anything here, there are no duplicates in the actors HAMT
// iself.
// itself.
if _, ok := seen[addr]; ok {
return nil
}

View File

@ -167,7 +167,7 @@ func (t walkSchedTaskType) String() string {
case dagTask:
return "dag"
}
panic(fmt.Sprintf("unknow task %d", t))
panic(fmt.Sprintf("unknown task %d", t))
}
type walkTask struct {

View File

@ -516,7 +516,7 @@ func (v *IndexerMessageValidator) Validate(ctx context.Context, pid peer.ID, msg
return pubsub.ValidationReject
}
if len(idxrMsg.ExtraData) == 0 {
log.Debugw("ignoring messsage missing miner id", "peer", originPeer)
log.Debugw("ignoring message missing miner id", "peer", originPeer)
return pubsub.ValidationIgnore
}
@ -552,7 +552,7 @@ func (v *IndexerMessageValidator) Validate(ctx context.Context, pid peer.ID, msg
// Check that the miner ID maps to the peer that sent the message.
err = v.authenticateMessage(ctx, minerAddr, originPeer)
if err != nil {
log.Warnw("cannot authenticate messsage", "err", err, "peer", originPeer, "minerID", minerAddr)
log.Warnw("cannot authenticate message", "err", err, "peer", originPeer, "minerID", minerAddr)
stats.Record(ctx, metrics.IndexerMessageValidationFailure.M(1))
return pubsub.ValidationReject
}

View File

@ -844,7 +844,7 @@ loop:
return nil, xerrors.Errorf("failed to load next local tipset: %w", err)
}
if base.IsChildOf(knownParent) {
// common case: receiving a block thats potentially part of the same tipset as our best block
// common case: receiving a block that's potentially part of the same tipset as our best block
return blockSet, nil
}

View File

@ -140,7 +140,7 @@ func (t *messageReceiptV0) UnmarshalCBOR(r io.Reader) (err error) {
case cbg.MajNegativeInt:
extraI = int64(extra)
if extraI < 0 {
return fmt.Errorf("int64 negative oveflow")
return fmt.Errorf("int64 negative overflow")
}
extraI = -1 - extraI
default:
@ -186,7 +186,7 @@ func (t *messageReceiptV0) UnmarshalCBOR(r io.Reader) (err error) {
case cbg.MajNegativeInt:
extraI = int64(extra)
if extraI < 0 {
return fmt.Errorf("int64 negative oveflow")
return fmt.Errorf("int64 negative overflow")
}
extraI = -1 - extraI
default:
@ -278,7 +278,7 @@ func (t *messageReceiptV1) UnmarshalCBOR(r io.Reader) (err error) {
case cbg.MajNegativeInt:
extraI = int64(extra)
if extraI < 0 {
return fmt.Errorf("int64 negative oveflow")
return fmt.Errorf("int64 negative overflow")
}
extraI = -1 - extraI
default:
@ -324,7 +324,7 @@ func (t *messageReceiptV1) UnmarshalCBOR(r io.Reader) (err error) {
case cbg.MajNegativeInt:
extraI = int64(extra)
if extraI < 0 {
return fmt.Errorf("int64 negative oveflow")
return fmt.Errorf("int64 negative overflow")
}
extraI = -1 - extraI
default:

View File

@ -104,9 +104,9 @@ domain separation tag.
### Winning PoSt proof
Draw randomness for current epoch with `WinningPoSt` domain separation tag.
Get list of sectors challanged in this epoch for this miner, based on the randomness drawn.
Get list of sectors challenged in this epoch for this miner, based on the randomness drawn.
`V`: Use filecoin proofs system to verify that miner prooved access to sealed versions of these sectors.
`V`: Use filecoin proofs system to verify that miner proved access to sealed versions of these sectors.
## `(*StateManager).TipSetState()`

View File

@ -482,7 +482,7 @@ func (ca *channelAccessor) listVouchers(ctx context.Context, ch address.Address)
// the data store over the chain state
func (ca *channelAccessor) laneState(ctx context.Context, state lpaych.State, ch address.Address) (map[uint64]lpaych.LaneState, error) {
// TODO: we probably want to call UpdateChannelState with all vouchers to be fully correct
// (but technically dont't need to)
// (but technically don't need to)
laneCount, err := state.LaneCount()
if err != nil {