Skip to content

Commit dbc19fb

Browse files
ledigangCoderZhi
andauthored
chore: minor improvement for docs (#4756)
Signed-off-by: ledigang <[email protected]> Co-authored-by: CoderZhi <[email protected]>
1 parent 1aa1bd9 commit dbc19fb

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

action/action.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const (
2525
)
2626

2727
type (
28-
// Action is the action can be Executed in protocols. The method is added to avoid mistakenly used empty interface as action.
28+
// Action is the action that can be executed in protocols. The method is added to avoid mistakenly using empty interface as action.
2929
Action interface {
3030
SanityCheck() error
3131
}
@@ -89,7 +89,7 @@ func FakeSeal(act Envelope, pubk crypto.PublicKey) *SealedEnvelope {
8989
return sealed
9090
}
9191

92-
// AssembleSealedEnvelope assembles a SealedEnvelope use Envelope, Sender Address and Signature.
92+
// AssembleSealedEnvelope assembles a SealedEnvelope using Envelope, Sender Address and Signature.
9393
// This method should be only used in tests.
9494
func AssembleSealedEnvelope(act Envelope, pk crypto.PublicKey, sig []byte) *SealedEnvelope {
9595
sealed := &SealedEnvelope{

api/coreservice.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ type (
131131
ActionByActionHash(h hash.Hash256) (*action.SealedEnvelope, *block.Block, uint32, error)
132132
// PendingActionByActionHash returns action by action hash
133133
PendingActionByActionHash(h hash.Hash256) (*action.SealedEnvelope, error)
134-
// ActionsInActPool returns the all Transaction Identifiers in the actpool
134+
// ActionsInActPool returns all Transaction Identifiers in the actpool
135135
ActionsInActPool(actHashes []string) ([]*action.SealedEnvelope, error)
136136
// BlockByHeightRange returns blocks within the height range
137137
BlockByHeightRange(uint64, uint64) ([]*apitypes.BlockWithReceipts, error)
@@ -145,7 +145,7 @@ type (
145145
EstimateMigrateStakeGasConsumption(context.Context, *action.MigrateStake, address.Address) (uint64, []byte, error)
146146
// EstimateGasForNonExecution estimates action gas except execution
147147
EstimateGasForNonExecution(action.Action) (uint64, error)
148-
// EstimateExecutionGasConsumption estimate gas consumption for execution action
148+
// EstimateExecutionGasConsumption estimates gas consumption for execution action
149149
EstimateExecutionGasConsumption(ctx context.Context, sc action.Envelope, callerAddr address.Address, opts ...protocol.SimulateOption) (uint64, []byte, error)
150150
// LogsInBlockByHash filter logs in the block by hash
151151
LogsInBlockByHash(filter *logfilter.LogFilter, blockHash hash.Hash256) ([]*action.Log, error)
@@ -1777,7 +1777,7 @@ func (core *coreService) estimateMigrateStakeGasConsumptionAt(ctx context.Contex
17771777
return gas + intrinsicGas, retval, nil
17781778
}
17791779

1780-
// EstimateExecutionGasConsumption estimate gas consumption for execution action
1780+
// EstimateExecutionGasConsumption estimates gas consumption for execution action
17811781
func (core *coreService) EstimateExecutionGasConsumption(ctx context.Context, elp action.Envelope, callerAddr address.Address, opts ...protocol.SimulateOption) (uint64, []byte, error) {
17821782
return core.estimateExecutionGasConsumptionAt(ctx, elp, callerAddr, 0, opts...)
17831783
}
@@ -1939,7 +1939,7 @@ func (core *coreService) getProtocolAccount(ctx context.Context, addr string) (*
19391939
}, out.GetBlockIdentifier(), nil
19401940
}
19411941

1942-
// ActionsInActPool returns the all Transaction Identifiers in the actpool
1942+
// ActionsInActPool returns all Transaction Identifiers in the actpool
19431943
func (core *coreService) ActionsInActPool(actHashes []string) ([]*action.SealedEnvelope, error) {
19441944
var ret []*action.SealedEnvelope
19451945
if len(actHashes) == 0 {

api/grpcserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ func (svr *gRPCHandler) EstimateGasForAction(ctx context.Context, in *iotexapi.E
396396
return &iotexapi.EstimateGasForActionResponse{Gas: estimateGas}, nil
397397
}
398398

399-
// EstimateActionGasConsumption estimate gas consume for action without signature
399+
// EstimateActionGasConsumption estimates gas consumption for action without signature
400400
func (svr *gRPCHandler) EstimateActionGasConsumption(ctx context.Context, in *iotexapi.EstimateActionGasConsumptionRequest) (*iotexapi.EstimateActionGasConsumptionResponse, error) {
401401
if in.GetExecution() != nil {
402402
callerAddr, err := address.FromString(in.GetCallerAddress())
@@ -652,7 +652,7 @@ func (svr *gRPCHandler) GetTransactionLogByBlockHeight(ctx context.Context, in *
652652
}, nil
653653
}
654654

655-
// GetActPoolActions returns the all Transaction Identifiers in the mempool
655+
// GetActPoolActions returns all Transaction Identifiers in the mempool
656656
func (svr *gRPCHandler) GetActPoolActions(ctx context.Context, in *iotexapi.GetActPoolActionsRequest) (*iotexapi.GetActPoolActionsResponse, error) {
657657
acts, err := svr.coreService.ActionsInActPool(in.ActionHashes)
658658
if err != nil {

0 commit comments

Comments
 (0)