Merge branch 'master' into sbansal/nonce-coordination-and-consensus-for-chain-nodes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//stm: #unit
|
||||
// stm: #unit
|
||||
package client
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//stm: #unit
|
||||
// stm: #unit
|
||||
package full
|
||||
|
||||
import (
|
||||
|
||||
@@ -1323,6 +1323,27 @@ func (sm *StorageMinerAPI) ComputeProof(ctx context.Context, ssi []builtin.Exten
|
||||
return sm.Epp.ComputeProof(ctx, ssi, rand, poStEpoch, nv)
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) RecoverFault(ctx context.Context, sectors []abi.SectorNumber) ([]cid.Cid, error) {
|
||||
allsectors, err := sm.Miner.ListSectors()
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("could not get a list of all sectors from the miner: %w", err)
|
||||
}
|
||||
var found bool
|
||||
for _, v := range sectors {
|
||||
found = false
|
||||
for _, s := range allsectors {
|
||||
if v == s.SectorNumber {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
return nil, xerrors.Errorf("sectors %d not found in the sector list for miner", v)
|
||||
}
|
||||
}
|
||||
return sm.WdPoSt.ManualFaultRecovery(ctx, sm.Miner.Address(), sectors)
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) RuntimeSubsystems(context.Context) (res api.MinerSubsystems, err error) {
|
||||
return sm.EnabledSubsystems, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user