fix(lotus-sim): don't take from the fund account when funding

This commit is contained in:
Steven Allen 2021-06-09 17:09:03 -07:00
parent 2b4f865665
commit 868231adc7

View File

@ -90,6 +90,10 @@ func (ss *simulationState) packFunding(ctx context.Context, cb packFunc) (_err e
var targets []*actor var targets []*actor
err = st.ForEach(func(addr address.Address, act *types.Actor) error { err = st.ForEach(func(addr address.Address, act *types.Actor) error {
// Don't steal from ourselves!
if addr == fundAccount {
return nil
}
if act.Balance.LessThan(taxMin) { if act.Balance.LessThan(taxMin) {
return nil return nil
} }