From 7c1d343e36d46397dcf240613978f077f3cd0e3e Mon Sep 17 00:00:00 2001 From: petercover Date: Wed, 22 Jan 2025 23:53:25 +0800 Subject: [PATCH] chore: fix some function names in comment Signed-off-by: petercover --- chain/exchange/types/key.go | 2 +- client/tm/tmclient.go | 2 +- typeddata/typed_data.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chain/exchange/types/key.go b/chain/exchange/types/key.go index c4023835..6e94fc42 100644 --- a/chain/exchange/types/key.go +++ b/chain/exchange/types/key.go @@ -416,7 +416,7 @@ func OrdersByMarketDirectionPriceOrderHashPrefix(marketID, orderHash common.Hash return append(ordersByMarketDirectionPricePrefix(marketID, price, isLong), orderHash.Bytes()...) } -// orderIndexByMarketDirectionSubaccountPrefix allows to obtain prefix of exchange against a particular marketID, direction and price +// ordersByMarketDirectionPricePrefix allows to obtain prefix of exchange against a particular marketID, direction and price func ordersByMarketDirectionPricePrefix(marketID common.Hash, price *big.Int, isLong bool) []byte { return append(MarketDirectionPrefix(marketID, isLong), common.LeftPadBytes(price.Bytes(), 32)...) } diff --git a/client/tm/tmclient.go b/client/tm/tmclient.go index fdb84f00..2b25acc4 100644 --- a/client/tm/tmclient.go +++ b/client/tm/tmclient.go @@ -41,7 +41,7 @@ func (c *tmClient) GetBlock(ctx context.Context, height int64) (*ctypes.ResultBl return c.rpcClient.Block(ctx, &height) } -// GetBlock queries for a block by height. An error is returned if the query fails. +// GetBlockResults queries for a block by height. An error is returned if the query fails. func (c *tmClient) GetBlockResults(ctx context.Context, height int64) (*ctypes.ResultBlockResults, error) { return c.rpcClient.BlockResults(ctx, &height) } diff --git a/typeddata/typed_data.go b/typeddata/typed_data.go index f52cefd1..f563c60e 100644 --- a/typeddata/typed_data.go +++ b/typeddata/typed_data.go @@ -102,7 +102,7 @@ type TypedDataDomain struct { var typedDataReferenceTypeRegexp = regexp.MustCompile(`^[A-Z](\w*)(\[\])?$`) -// SignTextWithValidator signs the given message which can be further recovered +// SignTextValidator signs the given message which can be further recovered // with the given validator. // hash = keccak256("\x19\x00"${address}${data}). func SignTextValidator(validatorData ValidatorData) (signature hexutil.Bytes, message string) {