From 5e54219be9440804a42ab336f997cd733b70ec7b Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Tue, 11 Aug 2020 01:10:12 -0400 Subject: [PATCH] fix spelling --- api/api_full.go | 4 ++-- api/apistruct/struct.go | 6 +++--- cli/chain.go | 4 ++-- cmd/lotus-pcr/main.go | 4 ++-- node/impl/full/gas.go | 2 +- node/impl/full/mpool.go | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/api/api_full.go b/api/api_full.go index 1a3850cc6..184805698 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -122,10 +122,10 @@ type FullNode interface { // It fails if message fails to execute. GasEstimateGasLimit(context.Context, *types.Message, types.TipSetKey) (int64, error) - // GasEsitmateGasPremium estimates what gas price should be used for a + // GasEstimateGasPremium estimates what gas price should be used for a // message to have high likelihood of inclusion in `nblocksincl` epochs. - GasEsitmateGasPremium(_ context.Context, nblocksincl uint64, + GasEstimateGasPremium(_ context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, tsk types.TipSetKey) (types.BigInt, error) // MethodGroup: Sync diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index bc3b72a17..4d0549337 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -87,7 +87,7 @@ type FullNodeStruct struct { BeaconGetEntry func(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) `perm:"read"` - GasEsitmateGasPremium func(context.Context, uint64, address.Address, int64, types.TipSetKey) (types.BigInt, error) `perm:"read"` + GasEstimateGasPremium func(context.Context, uint64, address.Address, int64, types.TipSetKey) (types.BigInt, error) `perm:"read"` GasEstimateGasLimit func(context.Context, *types.Message, types.TipSetKey) (int64, error) `perm:"read"` GasEstimateFeeCap func(context.Context, *types.Message, int64, types.TipSetKey) (types.BigInt, error) `perm:"read"` @@ -434,9 +434,9 @@ func (c *FullNodeStruct) ClientDealSize(ctx context.Context, root cid.Cid) (api. return c.Internal.ClientDealSize(ctx, root) } -func (c *FullNodeStruct) GasEsitmateGasPremium(ctx context.Context, nblocksincl uint64, +func (c *FullNodeStruct) GasEstimateGasPremium(ctx context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, tsk types.TipSetKey) (types.BigInt, error) { - return c.Internal.GasEsitmateGasPremium(ctx, nblocksincl, sender, gaslimit, tsk) + return c.Internal.GasEstimateGasPremium(ctx, nblocksincl, sender, gaslimit, tsk) } func (c *FullNodeStruct) GasEstimateFeeCap(ctx context.Context, msg *types.Message, maxqueueblks int64, tsk types.TipSetKey) (types.BigInt, error) { diff --git a/cli/chain.go b/cli/chain.go index 28a55c313..7760da249 100644 --- a/cli/chain.go +++ b/cli/chain.go @@ -1031,9 +1031,9 @@ var chainGasPriceCmd = &cli.Command{ nb := []int{1, 2, 3, 5, 10, 20, 50, 100, 300} for _, nblocks := range nb { - addr := builtin.SystemActorAddr // TODO: make real when used in GasEsitmateGasPremium + addr := builtin.SystemActorAddr // TODO: make real when used in GasEstimateGasPremium - est, err := api.GasEsitmateGasPremium(ctx, uint64(nblocks), addr, 10000, types.EmptyTSK) + est, err := api.GasEstimateGasPremium(ctx, uint64(nblocks), addr, 10000, types.EmptyTSK) if err != nil { return err } diff --git a/cmd/lotus-pcr/main.go b/cmd/lotus-pcr/main.go index aed67408a..43b0b2ffc 100644 --- a/cmd/lotus-pcr/main.go +++ b/cmd/lotus-pcr/main.go @@ -205,7 +205,7 @@ type processTipSetApi interface { StateMinerInitialPledgeCollateral(ctx context.Context, addr address.Address, precommitInfo miner.SectorPreCommitInfo, tsk types.TipSetKey) (types.BigInt, error) StateGetActor(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*types.Actor, error) MpoolPushMessage(ctx context.Context, msg *types.Message) (*types.SignedMessage, error) - GasEsitmateGasPremium(ctx context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, tsk types.TipSetKey) (types.BigInt, error) + GasEstimateGasPremium(ctx context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, tsk types.TipSetKey) (types.BigInt, error) WalletBalance(ctx context.Context, addr address.Address) (types.BigInt, error) } @@ -293,7 +293,7 @@ func ProcessTipset(ctx context.Context, api processTipSetApi, tipset *types.TipS refundValue := refunds.GetRefund(maddr) // We want to try and ensure these messages get mined quickly - gasPremium, err := api.GasEsitmateGasPremium(ctx, 0, wallet, 0, tipset.Key()) + gasPremium, err := api.GasEstimateGasPremium(ctx, 0, wallet, 0, tipset.Key()) if err != nil { log.Warnw("failed to estimate gas premium", "err", err) continue diff --git a/node/impl/full/gas.go b/node/impl/full/gas.go index c14c147a0..49f07b271 100644 --- a/node/impl/full/gas.go +++ b/node/impl/full/gas.go @@ -59,7 +59,7 @@ func (a *GasAPI) GasEstimateFeeCap(ctx context.Context, msg *types.Message, maxq return out, nil } -func (a *GasAPI) GasEsitmateGasPremium(ctx context.Context, nblocksincl uint64, +func (a *GasAPI) GasEstimateGasPremium(ctx context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, _ types.TipSetKey) (types.BigInt, error) { if nblocksincl == 0 { diff --git a/node/impl/full/mpool.go b/node/impl/full/mpool.go index cf901f77d..caf4255f3 100644 --- a/node/impl/full/mpool.go +++ b/node/impl/full/mpool.go @@ -152,7 +152,7 @@ func (a *MpoolAPI) MpoolPushMessage(ctx context.Context, msg *types.Message) (*t } if msg.GasPremium == types.EmptyInt || types.BigCmp(msg.GasPremium, types.NewInt(0)) == 0 { - gasPremium, err := a.GasEsitmateGasPremium(ctx, 2, msg.From, msg.GasLimit, types.TipSetKey{}) + gasPremium, err := a.GasEstimateGasPremium(ctx, 2, msg.From, msg.GasLimit, types.TipSetKey{}) if err != nil { return nil, xerrors.Errorf("estimating gas price: %w", err) }