Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
snadrus committed Jun 21, 2024
1 parent f1a6572 commit fc36dcc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions chain/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/filecoin-project/go-address"

"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/build/buildconstants"
"github.com/filecoin-project/lotus/chain/types"
)

Expand Down Expand Up @@ -43,7 +43,7 @@ func TestSignedMessageJsonRoundtrip(t *testing.T) {

func TestAddressType(t *testing.T) {
//stm: @CHAIN_TYPES_ADDRESS_PREFIX_001
build.SetAddressNetwork(address.Testnet)
buildconstants.SetAddressNetwork(address.Testnet)
addr, err := makeRandomAddress()
if err != nil {
t.Fatal(err)
Expand All @@ -53,7 +53,7 @@ func TestAddressType(t *testing.T) {
t.Fatalf("address should start with %s", address.TestnetPrefix)
}

build.SetAddressNetwork(address.Mainnet)
buildconstants.SetAddressNetwork(address.Mainnet)
addr, err = makeRandomAddress()
if err != nil {
t.Fatal(err)
Expand Down
4 changes: 2 additions & 2 deletions cmd/tvx/codenames_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ func TestProtocolCodenames(t *testing.T) {
t.Fatal("expected genesis codename")
}

if height := abi.ChainEpoch(build.UpgradeBreezeHeight + 1); GetProtocolCodename(height) != "breeze" {
if height := build.UpgradeBreezeHeight + 1; GetProtocolCodename(height) != "breeze" {
t.Fatal("expected breeze codename")
}

if height := build.UpgradeAssemblyHeight + 1; GetProtocolCodename(abi.ChainEpoch(height)) != "actorsv2" {
if height := build.UpgradeAssemblyHeight + 1; GetProtocolCodename(height) != "actorsv2" {
t.Fatal("expected actorsv2 codename")
}

Expand Down
3 changes: 2 additions & 1 deletion itests/eth_hash_lookup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/build/buildconstants"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/types/ethtypes"
"github.com/filecoin-project/lotus/itests/kit"
Expand Down Expand Up @@ -311,7 +312,7 @@ func TestTransactionHashLookupNonexistentMessage(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()

cid := build.MustParseCid("bafk2bzacecapjnxnyw4talwqv5ajbtbkzmzqiosztj5cb3sortyp73ndjl76e")
cid := buildconstants.MustParseCid("bafk2bzacecapjnxnyw4talwqv5ajbtbkzmzqiosztj5cb3sortyp73ndjl76e")

// We shouldn't be able to return a hash for this fake cid
chainHash, err := client.EthGetTransactionHashByCid(ctx, cid)
Expand Down

0 comments on commit fc36dcc

Please sign in to comment.