Use verified price for verified deals
This commit is contained in:
parent
2c1ef3708e
commit
73b9fe36e3
@ -637,10 +637,15 @@ func interactiveDeal(cctx *cli.Context) error {
|
|||||||
epochs = abi.ChainEpoch(dur / (time.Duration(build.BlockDelaySecs) * time.Second))
|
epochs = abi.ChainEpoch(dur / (time.Duration(build.BlockDelaySecs) * time.Second))
|
||||||
// TODO: do some more or epochs math (round to miner PP, deal start buffer)
|
// TODO: do some more or epochs math (round to miner PP, deal start buffer)
|
||||||
|
|
||||||
|
pricePerGib := ask.Price
|
||||||
|
if verified {
|
||||||
|
pricePerGib = ask.VerifiedPrice
|
||||||
|
}
|
||||||
|
|
||||||
gib := types.NewInt(1 << 30)
|
gib := types.NewInt(1 << 30)
|
||||||
|
|
||||||
// TODO: price is based on PaddedPieceSize, right?
|
// TODO: price is based on PaddedPieceSize, right?
|
||||||
epochPrice = types.BigDiv(types.BigMul(ask.Price, types.NewInt(uint64(ds.PieceSize))), gib)
|
epochPrice = types.BigDiv(types.BigMul(pricePerGib, types.NewInt(uint64(ds.PieceSize))), gib)
|
||||||
totalPrice := types.BigMul(epochPrice, types.NewInt(uint64(epochs)))
|
totalPrice := types.BigMul(epochPrice, types.NewInt(uint64(epochs)))
|
||||||
|
|
||||||
fmt.Printf("-----\n")
|
fmt.Printf("-----\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user