diff --git a/cmd/lotus-gateway/endtoend_test.go b/cmd/lotus-gateway/endtoend_test.go index 373d9d59529..dff37dee3f0 100644 --- a/cmd/lotus-gateway/endtoend_test.go +++ b/cmd/lotus-gateway/endtoend_test.go @@ -4,7 +4,6 @@ import ( "bytes" "context" "fmt" - "math" "os" "testing" "time" @@ -30,15 +29,11 @@ import ( "github.com/filecoin-project/lotus/api/v0api" "github.com/filecoin-project/lotus/api/v1api" "github.com/filecoin-project/lotus/chain/actors/policy" - "github.com/filecoin-project/lotus/chain/stmgr" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/node" builder "github.com/filecoin-project/lotus/node/test" ) -const maxLookbackCap = time.Duration(math.MaxInt64) -const maxStateWaitLookbackLimit = stmgr.LookbackNoLimit - func init() { policy.SetSupportedProofTypes(abi.RegisteredSealProof_StackedDrg2KiBV1) policy.SetConsensusMinerMinPower(abi.NewStoragePower(2048)) @@ -53,7 +48,7 @@ func TestWalletMsig(t *testing.T) { blocktime := 5 * time.Millisecond ctx := context.Background() - nodes := startNodes(ctx, t, blocktime, maxLookbackCap, maxStateWaitLookbackLimit) + nodes := startNodes(ctx, t, blocktime, DefautLookbackCap, DefaultStateWaitLookbackLimit) defer nodes.closer() lite := nodes.lite @@ -187,7 +182,7 @@ func TestMsigCLI(t *testing.T) { blocktime := 5 * time.Millisecond ctx := context.Background() - nodes := startNodesWithFunds(ctx, t, blocktime, maxLookbackCap, maxStateWaitLookbackLimit) + nodes := startNodesWithFunds(ctx, t, blocktime, DefautLookbackCap, DefaultStateWaitLookbackLimit) defer nodes.closer() lite := nodes.lite @@ -200,7 +195,7 @@ func TestDealFlow(t *testing.T) { blocktime := 5 * time.Millisecond ctx := context.Background() - nodes := startNodesWithFunds(ctx, t, blocktime, maxLookbackCap, maxStateWaitLookbackLimit) + nodes := startNodesWithFunds(ctx, t, blocktime, DefautLookbackCap, DefaultStateWaitLookbackLimit) defer nodes.closer() // For these tests where the block time is artificially short, just use @@ -216,7 +211,7 @@ func TestCLIDealFlow(t *testing.T) { blocktime := 5 * time.Millisecond ctx := context.Background() - nodes := startNodesWithFunds(ctx, t, blocktime, maxLookbackCap, maxStateWaitLookbackLimit) + nodes := startNodesWithFunds(ctx, t, blocktime, DefautLookbackCap, DefaultStateWaitLookbackLimit) defer nodes.closer() clitest.RunClientTest(t, cli.Commands, nodes.lite) diff --git a/cmd/lotus-gateway/main.go b/cmd/lotus-gateway/main.go index c35ab3cae4d..aa37f6de89c 100644 --- a/cmd/lotus-gateway/main.go +++ b/cmd/lotus-gateway/main.go @@ -32,8 +32,8 @@ import ( var log = logging.Logger("gateway") const ( - LookbackCap = time.Hour * 24 - StateWaitLookbackLimit = abi.ChainEpoch(20) + DefautLookbackCap = time.Hour * 24 + DefaultStateWaitLookbackLimit = abi.ChainEpoch(20) ) func main() { @@ -81,12 +81,12 @@ var runCmd = &cli.Command{ &cli.DurationFlag{ Name: "api-max-lookback", Usage: "maximum duration allowable for tipset lookbacks", - Value: LookbackCap, + Value: DefautLookbackCap, }, &cli.Int64Flag{ Name: "api-wait-lookback-limit", Usage: "maximum number of blocks to search back through for message inclusion", - Value: int64(StateWaitLookbackLimit), + Value: int64(DefaultStateWaitLookbackLimit), }, }, Action: func(cctx *cli.Context) error {