DHT now accessible through listener
This commit is contained in:
@@ -40,6 +40,7 @@ const (
|
||||
)
|
||||
|
||||
type Listener struct {
|
||||
DHT *dht.IpfsDHT
|
||||
MTU int
|
||||
Host host.Host
|
||||
connections map[string]*Conn
|
||||
@@ -77,12 +78,11 @@ func NewListener(rendezvous, multiAddr string,
|
||||
); fails(e) {
|
||||
return
|
||||
}
|
||||
var d *dht.IpfsDHT
|
||||
if d, e = NewDHT(ctx, c.Host, rdv); fails(e) {
|
||||
if c.DHT, e = NewDHT(ctx, c.Host, rdv); fails(e) {
|
||||
return
|
||||
}
|
||||
log.D.Ln("listening on", blue(GetHostOnlyAddress(c.Host)))
|
||||
go Discover(ctx, c.Host, d, rendezvous)
|
||||
go Discover(ctx, c.Host, c.DHT, rendezvous)
|
||||
c.Host.SetStreamHandler(IndraLibP2PID, c.handle)
|
||||
return
|
||||
}
|
||||
|
||||
10
version.go
10
version.go
@@ -8,13 +8,13 @@ const (
|
||||
// URL is the git URL for the repository.
|
||||
URL = ""
|
||||
// GitRef is the gitref, as in refs/heads/branchname.
|
||||
GitRef = "refs/heads/main"
|
||||
GitRef = "refs/heads/protocol"
|
||||
// ParentGitCommit is the commit hash of the parent HEAD.
|
||||
ParentGitCommit = "5a98b84e65d5c9e9be6b071f5c92b8700e3eadcf"
|
||||
ParentGitCommit = "028d2aa98a187875f4913f3476bc248a5003ae6b"
|
||||
// BuildTime stores the time when the current binary was built.
|
||||
BuildTime = "2023-03-24T21:06:55Z"
|
||||
BuildTime = "2023-05-12T20:20:16+01:00"
|
||||
// SemVer lists the (latest) git tag on the release.
|
||||
SemVer = "v0.0.11"
|
||||
SemVer = "v0.1.11"
|
||||
// PathBase is the path base returned from runtime caller.
|
||||
PathBase = "/opt/indra-labs/indra/"
|
||||
// Major is the major number from the tag.
|
||||
@@ -22,7 +22,7 @@ const (
|
||||
// Minor is the minor number from the tag.
|
||||
Minor = 1
|
||||
// Patch is the patch version number from the tag.
|
||||
Patch = 0
|
||||
Patch = 11
|
||||
)
|
||||
|
||||
// Version returns a pretty printed version information string.
|
||||
|
||||
Reference in New Issue
Block a user