gofmt
This commit is contained in:
parent
baf91f08a1
commit
e7d65be90a
@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
var pprofCmd = &cli.Command{
|
||||
Name: "pprof",
|
||||
Name: "pprof",
|
||||
Hidden: true,
|
||||
Subcommands: []*cli.Command{
|
||||
PprofGoroutines,
|
||||
@ -42,7 +42,7 @@ var PprofGoroutines = &cli.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
addr = "http://" + addr + "/debug/pprof/goroutine?debug=2"
|
||||
addr = "http://" + addr + "/debug/pprof/goroutine?debug=2"
|
||||
|
||||
r, err := http.Get(addr)
|
||||
if err != nil {
|
||||
@ -56,4 +56,3 @@ var PprofGoroutines = &cli.Command{
|
||||
return r.Body.Close()
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
var configCmd = &cli.Command{
|
||||
Name: "config",
|
||||
Name: "config",
|
||||
Usage: "Output default configuration",
|
||||
Action: func(cctx *cli.Context) error {
|
||||
comm, err := config.ConfigComment(config.DefaultStorageMiner())
|
||||
|
24
extern/storage-sealing/fsm_test.go
vendored
24
extern/storage-sealing/fsm_test.go
vendored
@ -70,12 +70,12 @@ func TestHappyPath(t *testing.T) {
|
||||
func TestSeedRevert(t *testing.T) {
|
||||
ma, _ := address.NewIDAddress(55151)
|
||||
m := test{
|
||||
s: &Sealing{
|
||||
maddr: ma,
|
||||
stats: SectorStats{
|
||||
bySector: map[abi.SectorID]statSectorState{},
|
||||
},
|
||||
},
|
||||
s: &Sealing{
|
||||
maddr: ma,
|
||||
stats: SectorStats{
|
||||
bySector: map[abi.SectorID]statSectorState{},
|
||||
},
|
||||
},
|
||||
t: t,
|
||||
state: &SectorInfo{State: Packing},
|
||||
}
|
||||
@ -117,12 +117,12 @@ func TestSeedRevert(t *testing.T) {
|
||||
func TestPlanCommittingHandlesSectorCommitFailed(t *testing.T) {
|
||||
ma, _ := address.NewIDAddress(55151)
|
||||
m := test{
|
||||
s: &Sealing{
|
||||
maddr: ma,
|
||||
stats: SectorStats{
|
||||
bySector: map[abi.SectorID]statSectorState{},
|
||||
},
|
||||
},
|
||||
s: &Sealing{
|
||||
maddr: ma,
|
||||
stats: SectorStats{
|
||||
bySector: map[abi.SectorID]statSectorState{},
|
||||
},
|
||||
},
|
||||
t: t,
|
||||
state: &SectorInfo{State: Committing},
|
||||
}
|
||||
|
1
extern/storage-sealing/sealiface/config.go
vendored
1
extern/storage-sealing/sealiface/config.go
vendored
@ -13,4 +13,3 @@ type Config struct {
|
||||
|
||||
WaitDealsDelay time.Duration
|
||||
}
|
||||
|
||||
|
2
extern/storage-sealing/sealing.go
vendored
2
extern/storage-sealing/sealing.go
vendored
@ -297,7 +297,7 @@ func (m *Sealing) newDealSector() (abi.SectorNumber, error) {
|
||||
var best abi.SectorNumber = math.MaxUint64
|
||||
|
||||
for sn, info := range m.unsealedInfoMap.infos {
|
||||
if info.stored + 1 > mostStored + 1 { // 18446744073709551615 + 1 = 0
|
||||
if info.stored+1 > mostStored+1 { // 18446744073709551615 + 1 = 0
|
||||
best = sn
|
||||
}
|
||||
}
|
||||
|
4
extern/storage-sealing/stats.go
vendored
4
extern/storage-sealing/stats.go
vendored
@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
type statSectorState int
|
||||
|
||||
const (
|
||||
sstSealing statSectorState = iota
|
||||
sstFailed
|
||||
@ -18,7 +19,7 @@ type SectorStats struct {
|
||||
lk sync.Mutex
|
||||
|
||||
bySector map[abi.SectorID]statSectorState
|
||||
totals [nsst]uint64
|
||||
totals [nsst]uint64
|
||||
}
|
||||
|
||||
func (ss *SectorStats) updateSector(id abi.SectorID, st SectorState) {
|
||||
@ -35,7 +36,6 @@ func (ss *SectorStats) updateSector(id abi.SectorID, st SectorState) {
|
||||
ss.totals[sst]++
|
||||
}
|
||||
|
||||
|
||||
// return the number of sectors currently in the sealing pipeline
|
||||
func (ss *SectorStats) curSealing() uint64 {
|
||||
ss.lk.Lock()
|
||||
|
@ -143,7 +143,7 @@ func DefaultStorageMiner() *StorageMiner {
|
||||
Sealing: SealingConfig{
|
||||
MaxWaitDealsSectors: 2, // 64G with 32G sectors
|
||||
MaxSealingSectors: 0,
|
||||
WaitDealsDelay: Duration(time.Hour),
|
||||
WaitDealsDelay: Duration(time.Hour),
|
||||
},
|
||||
|
||||
Storage: sectorstorage.SealerConfig{
|
||||
|
Loading…
Reference in New Issue
Block a user