File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ func (s *FakeEthService) GetTransactionByHash(hash common.Hash) (tx *types.Trans
67
67
return nil , false , nil
68
68
}
69
69
70
+ type FakeNetworkService struct {}
71
+
72
+ func (s * FakeNetworkService ) Version () (string , error ) {
73
+ return "100" , nil
74
+ }
75
+
70
76
func newTestServer (endpoint string ) (* rpc.Server , error ) {
71
77
// Create datadir.
72
78
if err := os .Mkdir (endpoint , 0777 ); err != nil {
@@ -87,6 +93,9 @@ func newTestServer(endpoint string) (*rpc.Server, error) {
87
93
if err := server .RegisterName ("eth" , new (FakeEthService )); err != nil {
88
94
return nil , err
89
95
}
96
+ if err := server .RegisterName ("net" , new (FakeNetworkService )); err != nil {
97
+ return nil , err
98
+ }
90
99
l , err := rpc .CreateIPCListener (endpoint + "/geth.ipc" )
91
100
if err != nil {
92
101
return nil , err
You can’t perform that action at this time.
0 commit comments