Refactor: State: Rename stmgr::GetNtwkVersion to GetNetworkVersion
This commit is contained in:
@@ -88,7 +88,7 @@ func NewBlockBuilder(ctx context.Context, logger *zap.SugaredLogger, sm *stmgr.S
|
||||
Actors: filcns.NewActorRegistry(),
|
||||
Syscalls: sm.VMSys(),
|
||||
CircSupplyCalc: sm.GetVMCirculatingSupply,
|
||||
NtwkVersion: sm.GetNtwkVersion,
|
||||
NtwkVersion: sm.GetNetworkVersion,
|
||||
BaseFee: abi.NewTokenAmount(0),
|
||||
LookbackState: stmgr.LookbackStateGetterForTipset(sm, parentTs),
|
||||
}
|
||||
@@ -265,7 +265,7 @@ func (bb *BlockBuilder) Height() abi.ChainEpoch {
|
||||
|
||||
// NetworkVersion returns the network version for the target block.
|
||||
func (bb *BlockBuilder) NetworkVersion() network.Version {
|
||||
return bb.sm.GetNtwkVersion(bb.ctx, bb.Height())
|
||||
return bb.sm.GetNetworkVersion(bb.ctx, bb.Height())
|
||||
}
|
||||
|
||||
// StateManager returns the stmgr.StateManager.
|
||||
|
||||
@@ -159,7 +159,7 @@ func (sim *Simulation) GetStart() *types.TipSet {
|
||||
|
||||
// GetNetworkVersion returns the current network version for the simulation.
|
||||
func (sim *Simulation) GetNetworkVersion() network.Version {
|
||||
return sim.StateManager.GetNtwkVersion(context.TODO(), sim.head.Height())
|
||||
return sim.StateManager.GetNetworkVersion(context.TODO(), sim.head.Height())
|
||||
}
|
||||
|
||||
// SetHead updates the current head of the simulation and stores it in the metadata store. This is
|
||||
|
||||
@@ -41,8 +41,8 @@ func (sim *Simulation) popNextMessages(ctx context.Context) ([]*types.Message, e
|
||||
// This isn't what the network does, but it makes things easier. Otherwise, we'd need to run
|
||||
// migrations before this epoch and I'd rather not deal with that.
|
||||
nextHeight := parentTs.Height() + 1
|
||||
prevVer := sim.StateManager.GetNtwkVersion(ctx, nextHeight-1)
|
||||
nextVer := sim.StateManager.GetNtwkVersion(ctx, nextHeight)
|
||||
prevVer := sim.StateManager.GetNetworkVersion(ctx, nextHeight-1)
|
||||
nextVer := sim.StateManager.GetNetworkVersion(ctx, nextHeight)
|
||||
if nextVer != prevVer {
|
||||
log.Warnw("packing no messages for version upgrade block",
|
||||
"old", prevVer,
|
||||
|
||||
Reference in New Issue
Block a user