Skip to content

Commit a8999cb

Browse files
authored
fix(actors): use network, not actors version in error message (#13038)
1 parent 8e2cef5 commit a8999cb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

chain/actors/builtin/miner/actor.go.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ func PledgePenaltyForContinuedFault(
378378
{{- end}}
379379
{{- end}}
380380
default:
381-
return big.Zero(), xerrors.Errorf("unsupported network version: %d", v)
381+
return big.Zero(), xerrors.Errorf("unsupported network version: %d", nwVer)
382382
}
383383
}
384384

@@ -401,6 +401,6 @@ func PledgePenaltyForTermination(
401401
{{- end}}
402402
{{- end}}
403403
default:
404-
return big.Zero(), xerrors.Errorf("unsupported network version: %d", v)
404+
return big.Zero(), xerrors.Errorf("unsupported network version: %d", nwVer)
405405
}
406406
}

chain/actors/builtin/miner/miner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ func PledgePenaltyForContinuedFault(
457457

458458
switch v {
459459
default:
460-
return big.Zero(), xerrors.Errorf("unsupported network version: %d", v)
460+
return big.Zero(), xerrors.Errorf("unsupported network version: %d", nwVer)
461461
}
462462
}
463463

@@ -476,6 +476,6 @@ func PledgePenaltyForTermination(
476476
case actorstypes.Version16:
477477
return minertypes16.PledgePenaltyForTermination(initialPledge, sectorAge, faultFee), nil
478478
default:
479-
return big.Zero(), xerrors.Errorf("unsupported network version: %d", v)
479+
return big.Zero(), xerrors.Errorf("unsupported network version: %d", nwVer)
480480
}
481481
}

0 commit comments

Comments
 (0)