lotus-pcr: use current tipset during refund

Using the tipset which is being processed might lead to incorrect gas
estimations or balance checking for the wallet.
This commit is contained in:
Travis Person 2020-09-05 02:34:08 +00:00
parent c573310c77
commit bf3466f3cb

View File

@ -225,7 +225,12 @@ var runCmd = &cli.Command{
continue
}
if err := rf.Refund(ctx, tipset, refunds, rounds); err != nil {
refundTipset, err := api.ChainHead(ctx)
if err != nil {
return err
}
if err := rf.Refund(ctx, refundTipset, refunds, rounds); err != nil {
return err
}