Merge remote-tracking branch 'origin/master' into next
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
@@ -150,6 +150,7 @@ func defaults() []Option {
|
||||
Override(new(helpers.MetricsCtx), context.Background),
|
||||
Override(new(record.Validator), modules.RecordValidator),
|
||||
Override(new(dtypes.Bootstrapper), dtypes.Bootstrapper(false)),
|
||||
Override(new(dtypes.ShutdownChan), make(chan struct{})),
|
||||
|
||||
// Filecoin modules
|
||||
|
||||
|
||||
@@ -27,10 +27,11 @@ import (
|
||||
type CommonAPI struct {
|
||||
fx.In
|
||||
|
||||
APISecret *dtypes.APIAlg
|
||||
Host host.Host
|
||||
Router lp2p.BaseIpfsRouting
|
||||
Sk *dtypes.ScoreKeeper
|
||||
APISecret *dtypes.APIAlg
|
||||
Host host.Host
|
||||
Router lp2p.BaseIpfsRouting
|
||||
Sk *dtypes.ScoreKeeper
|
||||
ShutdownChan dtypes.ShutdownChan
|
||||
}
|
||||
|
||||
type jwtPayload struct {
|
||||
@@ -133,4 +134,9 @@ func (a *CommonAPI) LogSetLevel(ctx context.Context, subsystem, level string) er
|
||||
return logging.SetLogLevel(subsystem, level)
|
||||
}
|
||||
|
||||
func (a *CommonAPI) Shutdown(ctx context.Context) error {
|
||||
a.ShutdownChan <- struct{}{}
|
||||
return nil
|
||||
}
|
||||
|
||||
var _ api.Common = &CommonAPI{}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package dtypes
|
||||
|
||||
// ShutdownChan is a channel to which you send a value if you intend to shut
|
||||
// down the daemon (or storage miner), including the node and RPC server.
|
||||
type ShutdownChan chan struct{}
|
||||
@@ -22,6 +22,7 @@ func init() {
|
||||
// configure larger overlay parameters
|
||||
pubsub.GossipSubD = 8
|
||||
pubsub.GossipSubDscore = 6
|
||||
pubsub.GossipSubDout = 3
|
||||
pubsub.GossipSubDlo = 6
|
||||
pubsub.GossipSubDhi = 12
|
||||
pubsub.GossipSubDlazy = 12
|
||||
|
||||
Reference in New Issue
Block a user