swarm: enable p2p/discovery and disable dynamic dialling (#19189)
This commit is contained in:
committed by
GitHub
parent
94eca08ad8
commit
4e9230ea7a
@ -18,6 +18,7 @@ package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/ethereum/go-ethereum/swarm/network"
|
||||
"github.com/ethereum/go-ethereum/swarm/storage"
|
||||
@ -38,6 +39,14 @@ func (inspector *Inspector) Hive() string {
|
||||
return inspector.hive.String()
|
||||
}
|
||||
|
||||
func (inspector *Inspector) ListKnown() []string {
|
||||
res := []string{}
|
||||
for _, v := range inspector.hive.Kademlia.ListKnown() {
|
||||
res = append(res, fmt.Sprintf("%v", v))
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
type HasInfo struct {
|
||||
Addr string `json:"address"`
|
||||
Has bool `json:"has"`
|
||||
|
Reference in New Issue
Block a user