connectiong gater API scaffolding

This commit is contained in:
vyzo
2020-11-13 12:17:48 +02:00
parent 4b1d1b6540
commit 5a0b9f4197
5 changed files with 56 additions and 0 deletions
+2
View File
@@ -15,6 +15,7 @@ import (
protocol "github.com/libp2p/go-libp2p-core/protocol"
swarm "github.com/libp2p/go-libp2p-swarm"
basichost "github.com/libp2p/go-libp2p/p2p/host/basic"
"github.com/libp2p/go-libp2p/p2p/net/conngater"
ma "github.com/multiformats/go-multiaddr"
"go.uber.org/fx"
"golang.org/x/xerrors"
@@ -36,6 +37,7 @@ type CommonAPI struct {
RawHost lp2p.RawHost
Host host.Host
Router lp2p.BaseIpfsRouting
ConnGater *conngater.BasicConnectionGater
Reporter metrics.Reporter
Sk *dtypes.ScoreKeeper
ShutdownChan dtypes.ShutdownChan
+22
View File
@@ -0,0 +1,22 @@
package common
import (
"context"
"github.com/filecoin-project/lotus/node/modules/dtypes"
)
func (a *CommonAPI) NetBlockAdd(ctx context.Context, acl dtypes.NetBlockList) error {
// TODO
return nil
}
func (a *CommonAPI) NetBlockRemove(ctx context.Context, acl dtypes.NetBlockList) error {
// TODO
return nil
}
func (a *CommonAPI) NetBlockList(ctx context.Context) (dtypes.NetBlockList, error) {
// TODO
return dtypes.NetBlockList{}, nil
}