Build libp2p node
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
committed by
Jakub Sztandera
parent
63627e863e
commit
0779e7dc00
@@ -1 +1,13 @@
|
||||
package modules
|
||||
|
||||
import (
|
||||
"github.com/libp2p/go-libp2p-core/peerstore"
|
||||
record "github.com/libp2p/go-libp2p-record"
|
||||
)
|
||||
|
||||
// RecordValidator provides namesys compatible routing record validator
|
||||
func RecordValidator(ps peerstore.Peerstore) record.Validator {
|
||||
return record.NamespacedValidator{
|
||||
"pk": record.PublicKeyValidator{},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package libp2p
|
||||
|
||||
import (
|
||||
"github.com/libp2p/go-libp2p"
|
||||
)
|
||||
|
||||
/*import (
|
||||
"github.com/libp2p/go-libp2p"
|
||||
autonat "github.com/libp2p/go-libp2p-autonat-svc"
|
||||
@@ -12,8 +16,6 @@ package libp2p
|
||||
"github.com/filecoin-project/go-lotus/node/modules/helpers"
|
||||
)
|
||||
|
||||
var NatPortMap = simpleOpt(libp2p.NATPortMap())
|
||||
|
||||
func AutoNATService(quic bool) func(repo repo.Repo, mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host) error {
|
||||
return func(repo repo.Repo, mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host) error {
|
||||
// collect private net option in case swarm.key is presented
|
||||
@@ -31,4 +33,6 @@ func AutoNATService(quic bool) func(repo repo.Repo, mctx helpers.MetricsCtx, lc
|
||||
return err
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
var NatPortMap = simpleOpt(libp2p.NATPortMap())
|
||||
|
||||
Reference in New Issue
Block a user