@@ -32,7 +32,6 @@ import (
32
32
"github.com/ethereum/go-ethereum/crypto"
33
33
"github.com/ethereum/go-ethereum/eth"
34
34
"github.com/ethereum/go-ethereum/logger/glog"
35
- "github.com/ethereum/go-ethereum/p2p"
36
35
"github.com/ethereum/go-ethereum/rlp"
37
36
"github.com/ethereum/go-ethereum/rpc/codec"
38
37
"github.com/ethereum/go-ethereum/rpc/comms"
@@ -81,17 +80,15 @@ type adminhandler func(*adminApi, *shared.Request) (interface{}, error)
81
80
// admin api provider
82
81
type adminApi struct {
83
82
xeth * xeth.XEth
84
- network * p2p.Server
85
83
ethereum * eth.Ethereum
86
84
codec codec.Codec
87
85
coder codec.ApiCoder
88
86
}
89
87
90
88
// create a new admin api instance
91
- func NewAdminApi (xeth * xeth.XEth , network * p2p. Server , ethereum * eth.Ethereum , codec codec.Codec ) * adminApi {
89
+ func NewAdminApi (xeth * xeth.XEth , ethereum * eth.Ethereum , codec codec.Codec ) * adminApi {
92
90
return & adminApi {
93
91
xeth : xeth ,
94
- network : network ,
95
92
ethereum : ethereum ,
96
93
codec : codec ,
97
94
coder : codec .New (nil ),
@@ -140,11 +137,11 @@ func (self *adminApi) AddPeer(req *shared.Request) (interface{}, error) {
140
137
}
141
138
142
139
func (self * adminApi ) Peers (req * shared.Request ) (interface {}, error ) {
143
- return self .network .PeersInfo (), nil
140
+ return self .ethereum . Network () .PeersInfo (), nil
144
141
}
145
142
146
143
func (self * adminApi ) NodeInfo (req * shared.Request ) (interface {}, error ) {
147
- return self .network .NodeInfo (), nil
144
+ return self .ethereum . Network () .NodeInfo (), nil
148
145
}
149
146
150
147
func (self * adminApi ) DataDir (req * shared.Request ) (interface {}, error ) {
0 commit comments