@@ -1746,6 +1746,8 @@ fn miner_forking() {
1746
1746
let node_2_rpc_bind = format ! ( "{localhost}:{node_2_rpc}" ) ;
1747
1747
let mut node_2_listeners = Vec :: new ( ) ;
1748
1748
1749
+ let max_sortitions = 30 ;
1750
+
1749
1751
// partition the signer set so that ~half are listening and using node 1 for RPC and events,
1750
1752
// and the rest are using node 2
1751
1753
@@ -1776,6 +1778,7 @@ fn miner_forking() {
1776
1778
config. burnchain . local_mining_public_key = Some ( btc_miner_1_pk. to_hex ( ) ) ;
1777
1779
config. miner . mining_key = Some ( Secp256k1PrivateKey :: from_seed ( & [ 1 ] ) ) ;
1778
1780
config. node . pox_sync_sample_secs = 30 ;
1781
+ config. burnchain . pox_reward_length = Some ( max_sortitions as u32 ) ;
1779
1782
1780
1783
config. events_observers . retain ( |listener| {
1781
1784
let Ok ( addr) = std:: net:: SocketAddr :: from_str ( & listener. endpoint ) else {
@@ -1797,11 +1800,10 @@ fn miner_forking() {
1797
1800
) ;
1798
1801
let conf = signer_test. running_nodes . conf . clone ( ) ;
1799
1802
let mut conf_node_2 = conf. clone ( ) ;
1800
- let localhost = "127.0.0.1" ;
1801
- conf_node_2. node . rpc_bind = format ! ( "{}:{}" , localhost, node_2_rpc) ;
1802
- conf_node_2. node . p2p_bind = format ! ( "{}:{}" , localhost, node_2_p2p) ;
1803
- conf_node_2. node . data_url = format ! ( "http://{}:{}" , localhost, node_2_rpc) ;
1804
- conf_node_2. node . p2p_address = format ! ( "{}:{}" , localhost, node_2_p2p) ;
1803
+ conf_node_2. node . rpc_bind = node_2_rpc_bind;
1804
+ conf_node_2. node . p2p_bind = format ! ( "{localhost}:{node_2_p2p}" ) ;
1805
+ conf_node_2. node . data_url = format ! ( "http://{localhost}:{node_2_rpc}" ) ;
1806
+ conf_node_2. node . p2p_address = format ! ( "{localhost}:{node_2_p2p}" ) ;
1805
1807
conf_node_2. node . seed = btc_miner_2_seed. clone ( ) ;
1806
1808
conf_node_2. burnchain . local_mining_public_key = Some ( btc_miner_2_pk. to_hex ( ) ) ;
1807
1809
conf_node_2. node . local_peer_seed = btc_miner_2_seed. clone ( ) ;
@@ -1931,7 +1933,6 @@ fn miner_forking() {
1931
1933
// (a) its the first nakamoto tenure
1932
1934
// (b) the prior sortition didn't have a tenure (because by this time RL2 will have up-to-date block processing)
1933
1935
let mut expects_miner_2_to_be_valid = true ;
1934
- let max_sortitions = 20 ;
1935
1936
// due to the random nature of mining sortitions, the way this test is structured
1936
1937
// is that keeps track of two scenarios that we want to cover, and once enough sortitions
1937
1938
// have been produced to cover those scenarios, it stops and checks the results at the end.
0 commit comments