File tree 3 files changed +4
-1
lines changed
3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2817,7 +2817,7 @@ impl BitcoinRPCRequest {
2817
2817
2818
2818
fn send ( config : & Config , payload : BitcoinRPCRequest ) -> RPCResult < serde_json:: Value > {
2819
2819
let request = BitcoinRPCRequest :: build_rpc_request ( & config, & payload) ;
2820
- let timeout = Duration :: from_secs ( 60 ) ;
2820
+ let timeout = Duration :: from_secs ( u64 :: from ( config . burnchain . timeout ) ) ;
2821
2821
2822
2822
let host = request. preamble ( ) . host . hostname ( ) ;
2823
2823
let port = request. preamble ( ) . host . port ( ) ;
Original file line number Diff line number Diff line change @@ -1416,6 +1416,7 @@ pub struct BurnchainConfig {
1416
1416
pub rpc_ssl : bool ,
1417
1417
pub username : Option < String > ,
1418
1418
pub password : Option < String > ,
1419
+ /// Timeout, in seconds, for communication with bitcoind
1419
1420
pub timeout : u32 ,
1420
1421
pub magic_bytes : MagicBytes ,
1421
1422
pub local_mining_public_key : Option < String > ,
@@ -1555,6 +1556,7 @@ pub struct BurnchainConfigFile {
1555
1556
pub rpc_ssl : Option < bool > ,
1556
1557
pub username : Option < String > ,
1557
1558
pub password : Option < String > ,
1559
+ /// Timeout, in seconds, for communication with bitcoind
1558
1560
pub timeout : Option < u32 > ,
1559
1561
pub magic_bytes : Option < String > ,
1560
1562
pub local_mining_public_key : Option < String > ,
Original file line number Diff line number Diff line change @@ -3178,6 +3178,7 @@ fn min_gap_between_blocks() {
3178
3178
. as_stacks_nakamoto ( )
3179
3179
. unwrap ( )
3180
3180
. timestamp ;
3181
+ assert ! ( blocks. len( ) >= 2 , "Expected at least 2 mined blocks" ) ;
3181
3182
let penultimate_block = blocks. get ( blocks. len ( ) - 2 ) . unwrap ( ) ;
3182
3183
let penultimate_block_time = penultimate_block
3183
3184
. anchored_header
You can’t perform that action at this time.
0 commit comments