Merge branch 'master' into sbansal/nonce-coordination-and-consensus-for-chain-nodes
This commit is contained in:
+3
-1
@@ -49,7 +49,8 @@ import (
|
||||
var log = logging.Logger("builder")
|
||||
|
||||
// special is a type used to give keys to modules which
|
||||
// can't really be identified by the returned type
|
||||
//
|
||||
// can't really be identified by the returned type
|
||||
type special struct{ id int }
|
||||
|
||||
//nolint:golint
|
||||
@@ -73,6 +74,7 @@ var (
|
||||
type invoke int
|
||||
|
||||
// Invokes are called in the order they are defined.
|
||||
//
|
||||
//nolint:golint
|
||||
const (
|
||||
// InitJournal at position 0 initializes the journal global var as soon as
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//stm: #unit
|
||||
// stm: #unit
|
||||
package config
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//stm: #unit
|
||||
// stm: #unit
|
||||
package config
|
||||
|
||||
import (
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//stm: #unit
|
||||
// stm: #unit
|
||||
package repo
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//stm: #unit
|
||||
// stm: #unit
|
||||
package repo
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//stm: #unit
|
||||
// stm: #unit
|
||||
package repo
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//stm: #unit
|
||||
// stm: #unit
|
||||
package node
|
||||
|
||||
import (
|
||||
|
||||
Reference in New Issue
Block a user