@@ -66,6 +66,7 @@ impl CardanoCliRunner {
66
66
fn command_for_utxo ( & self , address : & str , out_file : PathBuf ) -> Command {
67
67
let mut command = self . get_command ( ) ;
68
68
command
69
+ . arg ( "latest" )
69
70
. arg ( "query" )
70
71
. arg ( "utxo" )
71
72
. arg ( "--address" )
@@ -79,7 +80,7 @@ impl CardanoCliRunner {
79
80
80
81
fn command_for_stake_distribution ( & self ) -> Command {
81
82
let mut command = self . get_command ( ) ;
82
- command. arg ( "query" ) . arg ( "stake-distribution" ) ;
83
+ command. arg ( "latest" ) . arg ( " query") . arg ( "stake-distribution" ) ;
83
84
self . post_config_command ( & mut command) ;
84
85
85
86
command
@@ -88,6 +89,7 @@ impl CardanoCliRunner {
88
89
fn command_for_stake_snapshot ( & self , stake_pool_id : & str ) -> Command {
89
90
let mut command = self . get_command ( ) ;
90
91
command
92
+ . arg ( "latest" )
91
93
. arg ( "query" )
92
94
. arg ( "stake-snapshot" )
93
95
. arg ( "--stake-pool-id" )
@@ -100,6 +102,7 @@ impl CardanoCliRunner {
100
102
fn command_for_stake_snapshot_all_pools ( & self ) -> Command {
101
103
let mut command = self . get_command ( ) ;
102
104
command
105
+ . arg ( "latest" )
103
106
. arg ( "query" )
104
107
. arg ( "stake-snapshot" )
105
108
. arg ( "--all-stake-pools" ) ;
@@ -110,15 +113,15 @@ impl CardanoCliRunner {
110
113
111
114
fn command_for_epoch ( & self ) -> Command {
112
115
let mut command = self . get_command ( ) ;
113
- command. arg ( "query" ) . arg ( "tip" ) ;
116
+ command. arg ( "latest" ) . arg ( " query") . arg ( "tip" ) ;
114
117
self . post_config_command ( & mut command) ;
115
118
116
119
command
117
120
}
118
121
119
122
fn command_for_chain_point ( & self ) -> Command {
120
123
let mut command = self . get_command ( ) ;
121
- command. arg ( "query" ) . arg ( "tip" ) ;
124
+ command. arg ( "latest" ) . arg ( " query") . arg ( "tip" ) ;
122
125
self . post_config_command ( & mut command) ;
123
126
124
127
command
@@ -127,6 +130,7 @@ impl CardanoCliRunner {
127
130
fn command_for_kes_period ( & self , opcert_file : & str ) -> Command {
128
131
let mut command = self . get_command ( ) ;
129
132
command
133
+ . arg ( "latest" )
130
134
. arg ( "query" )
131
135
. arg ( "kes-period-info" )
132
136
. arg ( "--op-cert-file" )
@@ -556,8 +560,8 @@ mod tests {
556
560
CardanoNetwork :: TestNet ( 10 ) ,
557
561
) ;
558
562
559
- assert_eq ! ( "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" query\" \" tip\" \" --testnet-magic\" \" 10\" , kill_on_drop: false }" , format!( "{:?}" , runner. command_for_epoch( ) ) ) ;
560
- assert_eq ! ( "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" query\" \" stake-distribution\" \" --testnet-magic\" \" 10\" , kill_on_drop: false }" , format!( "{:?}" , runner. command_for_stake_distribution( ) ) ) ;
563
+ assert_eq ! ( "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" latest \" \" query\" \" tip\" \" --testnet-magic\" \" 10\" , kill_on_drop: false }" , format!( "{:?}" , runner. command_for_epoch( ) ) ) ;
564
+ assert_eq ! ( "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" latest \" \" query\" \" stake-distribution\" \" --testnet-magic\" \" 10\" , kill_on_drop: false }" , format!( "{:?}" , runner. command_for_stake_distribution( ) ) ) ;
561
565
}
562
566
563
567
#[ tokio:: test]
@@ -568,8 +572,8 @@ mod tests {
568
572
CardanoNetwork :: DevNet ( 25 ) ,
569
573
) ;
570
574
571
- assert_eq ! ( "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" query\" \" tip\" \" --cardano-mode\" \" --testnet-magic\" \" 25\" , kill_on_drop: false }" , format!( "{:?}" , runner. command_for_epoch( ) ) ) ;
572
- assert_eq ! ( "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" query\" \" stake-distribution\" \" --cardano-mode\" \" --testnet-magic\" \" 25\" , kill_on_drop: false }" , format!( "{:?}" , runner. command_for_stake_distribution( ) ) ) ;
575
+ assert_eq ! ( "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" latest \" \" query\" \" tip\" \" --cardano-mode\" \" --testnet-magic\" \" 25\" , kill_on_drop: false }" , format!( "{:?}" , runner. command_for_epoch( ) ) ) ;
576
+ assert_eq ! ( "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" latest \" \" query\" \" stake-distribution\" \" --cardano-mode\" \" --testnet-magic\" \" 25\" , kill_on_drop: false }" , format!( "{:?}" , runner. command_for_stake_distribution( ) ) ) ;
573
577
}
574
578
575
579
#[ tokio:: test]
@@ -581,11 +585,11 @@ mod tests {
581
585
) ;
582
586
583
587
assert_eq ! (
584
- "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" query\" \" tip\" \" --mainnet\" , kill_on_drop: false }" ,
588
+ "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" latest \" \" query\" \" tip\" \" --mainnet\" , kill_on_drop: false }" ,
585
589
format!( "{:?}" , runner. command_for_epoch( ) )
586
590
) ;
587
591
assert_eq ! (
588
- "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" query\" \" stake-distribution\" \" --mainnet\" , kill_on_drop: false }" ,
592
+ "Command { std: CARDANO_NODE_SOCKET_PATH=\" /tmp/whatever.sock\" \" cardano-cli\" \" latest \" \" query\" \" stake-distribution\" \" --mainnet\" , kill_on_drop: false }" ,
589
593
format!( "{:?}" , runner. command_for_stake_distribution( ) )
590
594
) ;
591
595
}
0 commit comments