@@ -95,9 +95,9 @@ func (g *gethrpc) waitSynced() {
95
95
}
96
96
}
97
97
98
- func startGethWithRpc (t * testing.T , name string , args ... string ) * gethrpc {
98
+ func startGethWithIpc (t * testing.T , name string , args ... string ) * gethrpc {
99
99
g := & gethrpc {name : name }
100
- args = append ([]string {"--networkid=42" , "--port=0" , "--nousb" , "--http" , "--http.port=0" , "--http.api=admin,eth,les" }, args ... )
100
+ args = append ([]string {"--networkid=42" , "--port=0" , "--nousb" }, args ... )
101
101
t .Logf ("Starting %v with rpc: %v" , name , args )
102
102
g .geth = runGeth (t , args ... )
103
103
// wait before we can attach to it. TODO: probe for it properly
@@ -112,23 +112,23 @@ func startGethWithRpc(t *testing.T, name string, args ...string) *gethrpc {
112
112
}
113
113
114
114
func initGeth (t * testing.T ) string {
115
- g := runGeth (t , "--networkid=42" , "init" , "./testdata/clique.json" )
115
+ g := runGeth (t , "--nousb" , "-- networkid=42" , "init" , "./testdata/clique.json" )
116
116
datadir := g .Datadir
117
117
g .WaitExit ()
118
118
return datadir
119
119
}
120
120
121
121
func startLightServer (t * testing.T ) * gethrpc {
122
122
datadir := initGeth (t )
123
- runGeth (t , "--datadir" , datadir , "--password" , "./testdata/password.txt" , "account" , "import" , "./testdata/key.prv" ).WaitExit ()
123
+ runGeth (t , "--nousb" , "-- datadir" , datadir , "--password" , "./testdata/password.txt" , "account" , "import" , "./testdata/key.prv" ).WaitExit ()
124
124
account := "0x02f0d131f1f97aef08aec6e3291b957d9efe7105"
125
- server := startGethWithRpc (t , "lightserver" , "--allow-insecure-unlock" , "--datadir" , datadir , "--password" , "./testdata/password.txt" , "--unlock" , account , "--mine" , "--light.serve=100" , "--light.maxpeers=1" , "--nodiscover" , "--nat=extip:127.0.0.1" )
125
+ server := startGethWithIpc (t , "lightserver" , "--allow-insecure-unlock" , "--datadir" , datadir , "--password" , "./testdata/password.txt" , "--unlock" , account , "--mine" , "--light.serve=100" , "--light.maxpeers=1" , "--nodiscover" , "--nat=extip:127.0.0.1" )
126
126
return server
127
127
}
128
128
129
129
func startClient (t * testing.T , name string ) * gethrpc {
130
130
datadir := initGeth (t )
131
- return startGethWithRpc (t , name , "--datadir" , datadir , "--nodiscover" , "--syncmode=light" , "--nat=extip:127.0.0.1" )
131
+ return startGethWithIpc (t , name , "--datadir" , datadir , "--nodiscover" , "--syncmode=light" , "--nat=extip:127.0.0.1" )
132
132
}
133
133
134
134
func TestPriorityClient (t * testing.T ) {
@@ -166,6 +166,7 @@ func TestPriorityClient(t *testing.T) {
166
166
freeCli .getNodeInfo ().ID : freeCli ,
167
167
prioCli .getNodeInfo ().ID : prioCli ,
168
168
}
169
+ time .Sleep (1 * time .Second )
169
170
lightServer .callRPC (& peers , "admin_peers" )
170
171
peersWithNames := make (map [string ]string )
171
172
for _ , p := range peers {
0 commit comments