Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions cmd/lotus-shed/miner-fees.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,21 +563,30 @@ var minerFeesInspect = &cli.Command{
}
cronParams = &p

fee, penalty, err := inspectMiner(trace.Msg.To)
if err != nil {
return xerrors.Errorf("inspecting miner: %w", err)
}
thisExecCronMiner = &minerBurn{
addr: trace.Msg.To,
burn: big.Zero(),
fee: fee,
penalty: penalty,
fee: big.Zero(),
penalty: big.Zero(),
}
burns = append(burns, thisExecCronMiner)
cronMinerCalls[trace.Msg.To] = struct{}{}
} else if thisExecCronMiner != nil && trace.Msg.From == thisExecCronMiner.addr && trace.Msg.To == burnAddr {
// TODO: handle multiple burn? Shouldn't happen but maybe it should be checked?
thisExecCronMiner.burn = trace.Msg.Value

// If we have a burn, we can inspect the miner for fees and penalties.
if thisExecCronMiner.burn.IsZero() {
return nil
}

fee, penalty, err := inspectMiner(trace.Msg.From)
if err != nil {
return xerrors.Errorf("inspecting miner: %w", err)
}

thisExecCronMiner.fee = fee
thisExecCronMiner.penalty = penalty
}

for _, st := range trace.Subcalls {
Expand Down