Create an api.MinerInfo that has peerID as a Peer ID
This commit is contained in:
@@ -77,12 +77,17 @@ func (a *StateAPI) StateMinerProvingSet(ctx context.Context, addr address.Addres
|
||||
return stmgr.GetProvingSetRaw(ctx, a.StateManager, mas)
|
||||
}
|
||||
|
||||
func (a *StateAPI) StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (miner.MinerInfo, error) {
|
||||
func (a *StateAPI) StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (api.MinerInfo, error) {
|
||||
ts, err := a.Chain.GetTipSetFromKey(tsk)
|
||||
if err != nil {
|
||||
return miner.MinerInfo{}, xerrors.Errorf("loading tipset %s: %w", tsk, err)
|
||||
return api.MinerInfo{}, xerrors.Errorf("loading tipset %s: %w", tsk, err)
|
||||
}
|
||||
return stmgr.StateMinerInfo(ctx, a.StateManager, ts, actor)
|
||||
|
||||
mi, err := stmgr.StateMinerInfo(ctx, a.StateManager, ts, actor)
|
||||
if err != nil {
|
||||
return api.MinerInfo{}, err
|
||||
}
|
||||
return api.NewApiMinerInfo(mi), nil
|
||||
}
|
||||
|
||||
func (a *StateAPI) StateMinerDeadlines(ctx context.Context, m address.Address, tsk types.TipSetKey) (*miner.Deadlines, error) {
|
||||
|
||||
Reference in New Issue
Block a user