@@ -8132,16 +8132,16 @@ fn mock_mining() {
8132
8132
let send_amt = 100 ;
8133
8133
let send_fee = 180 ;
8134
8134
8135
- let node_1_rpc = 51024 ;
8136
- let node_1_p2p = 51023 ;
8137
- let node_2_rpc = 51026 ;
8138
- let node_2_p2p = 51025 ;
8135
+ let node_1_rpc = gen_random_port ( ) ;
8136
+ let node_1_p2p = gen_random_port ( ) ;
8137
+ let node_2_rpc = gen_random_port ( ) ;
8138
+ let node_2_p2p = gen_random_port ( ) ;
8139
8139
8140
8140
let localhost = "127.0.0.1" ;
8141
- naka_conf. node . rpc_bind = format ! ( "{}:{}" , localhost , node_1_rpc ) ;
8142
- naka_conf. node . p2p_bind = format ! ( "{}:{}" , localhost , node_1_p2p ) ;
8143
- naka_conf. node . data_url = format ! ( "http://{}:{}" , localhost , node_1_rpc ) ;
8144
- naka_conf. node . p2p_address = format ! ( "{}:{}" , localhost , node_1_p2p ) ;
8141
+ naka_conf. node . rpc_bind = format ! ( "{localhost }:{node_1_rpc}" ) ;
8142
+ naka_conf. node . p2p_bind = format ! ( "{localhost }:{node_1_p2p}" ) ;
8143
+ naka_conf. node . data_url = format ! ( "http://{localhost }:{node_1_rpc}" ) ;
8144
+ naka_conf. node . p2p_address = format ! ( "{localhost }:{node_1_p2p}" ) ;
8145
8145
let http_origin = format ! ( "http://{}" , & naka_conf. node. rpc_bind) ;
8146
8146
8147
8147
naka_conf. add_initial_balance (
@@ -8221,10 +8221,10 @@ fn mock_mining() {
8221
8221
follower_conf. node . seed = vec ! [ 0x01 ; 32 ] ;
8222
8222
follower_conf. node . local_peer_seed = vec ! [ 0x02 ; 32 ] ;
8223
8223
8224
- follower_conf. node . rpc_bind = format ! ( "{}:{}" , localhost , node_2_rpc ) ;
8225
- follower_conf. node . p2p_bind = format ! ( "{}:{}" , localhost , node_2_p2p ) ;
8226
- follower_conf. node . data_url = format ! ( "http://{}:{}" , localhost , node_2_rpc ) ;
8227
- follower_conf. node . p2p_address = format ! ( "{}:{}" , localhost , node_2_p2p ) ;
8224
+ follower_conf. node . rpc_bind = format ! ( "{localhost }:{node_2_rpc}" ) ;
8225
+ follower_conf. node . p2p_bind = format ! ( "{localhost }:{node_2_p2p}" ) ;
8226
+ follower_conf. node . data_url = format ! ( "http://{localhost }:{node_2_rpc}" ) ;
8227
+ follower_conf. node . p2p_address = format ! ( "{localhost }:{node_2_p2p}" ) ;
8228
8228
8229
8229
let node_info = get_chain_info ( & naka_conf) ;
8230
8230
follower_conf. node . add_bootstrap_node (
0 commit comments