Rename MiningBaseInfo.HasMinPower to EligibleForMining
This commit is contained in:
parent
14ad91c53f
commit
f8c886a611
@ -806,14 +806,14 @@ type CirculatingSupply struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type MiningBaseInfo struct {
|
type MiningBaseInfo struct {
|
||||||
MinerPower types.BigInt
|
MinerPower types.BigInt
|
||||||
NetworkPower types.BigInt
|
NetworkPower types.BigInt
|
||||||
Sectors []builtin.SectorInfo
|
Sectors []builtin.SectorInfo
|
||||||
WorkerKey address.Address
|
WorkerKey address.Address
|
||||||
SectorSize abi.SectorSize
|
SectorSize abi.SectorSize
|
||||||
PrevBeaconEntry types.BeaconEntry
|
PrevBeaconEntry types.BeaconEntry
|
||||||
BeaconEntries []types.BeaconEntry
|
BeaconEntries []types.BeaconEntry
|
||||||
HasMinPower bool
|
EligibleForMining bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type BlockTemplate struct {
|
type BlockTemplate struct {
|
||||||
|
@ -506,14 +506,14 @@ func MinerGetBaseInfo(ctx context.Context, sm *StateManager, bcs beacon.Schedule
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &api.MiningBaseInfo{
|
return &api.MiningBaseInfo{
|
||||||
MinerPower: mpow.QualityAdjPower,
|
MinerPower: mpow.QualityAdjPower,
|
||||||
NetworkPower: tpow.QualityAdjPower,
|
NetworkPower: tpow.QualityAdjPower,
|
||||||
Sectors: sectors,
|
Sectors: sectors,
|
||||||
WorkerKey: worker,
|
WorkerKey: worker,
|
||||||
SectorSize: info.SectorSize,
|
SectorSize: info.SectorSize,
|
||||||
PrevBeaconEntry: *prev,
|
PrevBeaconEntry: *prev,
|
||||||
BeaconEntries: entries,
|
BeaconEntries: entries,
|
||||||
HasMinPower: hmp,
|
EligibleForMining: hmp,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg,
|
|||||||
if mbi == nil {
|
if mbi == nil {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
if !mbi.HasMinPower {
|
if !mbi.EligibleForMining {
|
||||||
// slashed or just have no power yet
|
// slashed or just have no power yet
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user