Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode committed Aug 21, 2023
1 parent eabefc4 commit 5e6cda3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/submodule/eth/eth_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ func (a *ethAPI) getTipsetByEthBlockNumberOrHash(ctx context.Context, blkParam t
// verify that the tipset is in the canonical chain
if blkParam.RequireCanonical {
// walk up the current chain (our head) until we reach ts.Height()
walkTs, err := a.chain.ChainGetTipSetByHeight(ctx, ts.Height(), head.Key())
walkTS, err := a.chain.ChainGetTipSetByHeight(ctx, ts.Height(), head.Key())
if err != nil {
return nil, fmt.Errorf("cannot get tipset at height: %v", ts.Height())
}

// verify that it equals the expected tipset
if !walkTs.Equals(ts) {
if !walkTS.Equals(ts) {
return nil, fmt.Errorf("tipset is not canonical")
}
}
Expand Down Expand Up @@ -1093,7 +1093,7 @@ func (a *ethAPI) EthCall(ctx context.Context, tx types.EthCall, blkParam types.E
}
ts, err := a.getTipsetByEthBlockNumberOrHash(ctx, blkParam)
if err != nil {
return nil, fmt.Errorf("cannot parse block param: %s, %v", blkParam, err)
return nil, fmt.Errorf("cannot parse block param: %v, %v", blkParam, err)
}

invokeResult, err := a.applyMessage(ctx, msg, ts.Key())
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/types/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ func NewEthBlockNumberOrHashFromNumber(number EthUint64) EthBlockNumberOrHash {

func NewEthBlockNumberOrHashFromHexString(str string) (EthBlockNumberOrHash, error) {
// check if block param is a number (decimal or hex)
var num EthUint64 = 0
var num EthUint64
err := num.UnmarshalJSON([]byte(str))
if err != nil {
return NewEthBlockNumberOrHashFromNumber(0), err
Expand Down

0 comments on commit 5e6cda3

Please sign in to comment.