Skip to content

Commit

Permalink
lotus-pcr: use current tipset during refund
Browse files Browse the repository at this point in the history
Using the tipset which is being processed might lead to incorrect gas
estimations or balance checking for the wallet.
  • Loading branch information
travisperson committed Sep 5, 2020
1 parent c573310 commit f46ac1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/lotus-pcr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ var runCmd = &cli.Command{
continue
}

if err := rf.Refund(ctx, tipset, refunds, rounds); err != nil {
refundTipset, err := api.ChainHead()
if err != nil {
return err
}

if err := rf.Refund(ctx, refundTipset, refunds, rounds); err != nil {
return err
}

Expand Down

0 comments on commit f46ac1c

Please sign in to comment.