From 006eff56237485dcc6d2c53ad2a74f40ef70a94c Mon Sep 17 00:00:00 2001 From: Aarsh Shah Date: Wed, 14 Oct 2020 11:17:44 +0530 Subject: [PATCH] use updated stored ask api --- extern/test-vectors | 2 +- node/modules/storageminer.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extern/test-vectors b/extern/test-vectors index a8f968adeba..7d3becbeb5b 160000 --- a/extern/test-vectors +++ b/extern/test-vectors @@ -1 +1 @@ -Subproject commit a8f968adeba1995f161f7be0048188affc425079 +Subproject commit 7d3becbeb5b932baed419c43390595b5e5cece12 diff --git a/node/modules/storageminer.go b/node/modules/storageminer.go index 613203a60fb..adacf540588 100644 --- a/node/modules/storageminer.go +++ b/node/modules/storageminer.go @@ -393,13 +393,13 @@ func NewStorageAsk(ctx helpers.MetricsCtx, fapi lapi.FullNode, ds dtypes.Metadat if err != nil { return nil, err } - storedAsk, err := storedask.NewStoredAsk(namespace.Wrap(providerDs, datastore.NewKey("/storage-ask")), datastore.NewKey("latest"), spn, address.Address(minerAddress)) + storedAsk, err := storedask.NewStoredAsk(namespace.Wrap(providerDs, datastore.NewKey("/storage-ask")), datastore.NewKey("latest"), spn, address.Address(minerAddress), + storagemarket.MaxPieceSize(abi.PaddedPieceSize(mi.SectorSize))) if err != nil { return nil, err } - // Hacky way to set max piece size to the sector size a := storedAsk.GetAsk().Ask - err = storedAsk.SetAsk(a.Price, a.VerifiedPrice, a.Expiry-a.Timestamp, storagemarket.MaxPieceSize(abi.PaddedPieceSize(mi.SectorSize))) + err = storedAsk.SetAsk(a.Price, a.VerifiedPrice, a.Expiry-a.Timestamp) if err != nil { return storedAsk, err }