mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
startHttpServer missing in Api.Start()
This commit is contained in:
parent
fe3218016c
commit
14d90eee7c
1 changed files with 3 additions and 1 deletions
|
|
@ -21,12 +21,13 @@ on top of the dpa
|
|||
type Api struct {
|
||||
dpa *DPA
|
||||
netStore *netStore
|
||||
port string
|
||||
Resolver *resolver.Resolver
|
||||
}
|
||||
|
||||
func NewApi(datadir, port string) (api *Api, err error) {
|
||||
|
||||
api = &Api{}
|
||||
api = &Api{port: port}
|
||||
|
||||
api.netStore, err = newNetStore(filepath.Join(datadir, "bzz"), filepath.Join(datadir, "bzzpeers.json"))
|
||||
if err != nil {
|
||||
|
|
@ -49,6 +50,7 @@ func (self *Api) Bzz() (p2p.Protocol, error) {
|
|||
func (self *Api) Start(node *discover.Node, connectPeer func(string) error) {
|
||||
self.dpa.Start()
|
||||
self.netStore.Start(node, connectPeer)
|
||||
go startHttpServer(self, self.port)
|
||||
}
|
||||
|
||||
func (self *Api) Stop() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue