File tree Expand file tree Collapse file tree 3 files changed +0
-20
lines changed Expand file tree Collapse file tree 3 files changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ pub enum EpochsStateQuery {
15
15
GetEpochBlockDistributionByPool { epoch_number : u64 } ,
16
16
17
17
// Pools related queries
18
- GetBlocksMintedByPools { vrf_key_hashes : Vec < KeyHash > } ,
19
18
GetTotalBlocksMintedByPools { vrf_key_hashes : Vec < KeyHash > } ,
20
19
GetBlocksMintedInfoByPool { vrf_key_hash : KeyHash } ,
21
20
GetBlockHashesByPool { vrf_key_hash : KeyHash } ,
@@ -33,7 +32,6 @@ pub enum EpochsStateQueryResponse {
33
32
EpochBlockDistributionByPool ( EpochBlockDistributionByPool ) ,
34
33
35
34
// Pools related responses
36
- BlocksMintedByPools ( Vec < u64 > ) ,
37
35
TotalBlocksMintedByPools ( Vec < u64 > ) ,
38
36
BlocksMintedInfoByPool ( BlocksMintedInfoByPool ) ,
39
37
BlockHashesByPool ( Vec < BlockHash > ) ,
Original file line number Diff line number Diff line change @@ -230,12 +230,6 @@ impl EpochsState {
230
230
}
231
231
}
232
232
233
- EpochsStateQuery :: GetBlocksMintedByPools { vrf_key_hashes } => {
234
- EpochsStateQueryResponse :: BlocksMintedByPools (
235
- state. get_blocks_minted_by_pools ( vrf_key_hashes) ,
236
- )
237
- }
238
-
239
233
EpochsStateQuery :: GetTotalBlocksMintedByPools { vrf_key_hashes } => {
240
234
EpochsStateQueryResponse :: TotalBlocksMintedByPools (
241
235
state. get_total_blocks_minted_by_pools ( vrf_key_hashes) ,
Original file line number Diff line number Diff line change @@ -113,14 +113,6 @@ impl State {
113
113
}
114
114
}
115
115
116
- /// Get current epoch's blocks minted for each vrf key hash
117
- pub fn get_blocks_minted_by_pools ( & self , vrf_key_hashes : & Vec < KeyHash > ) -> Vec < u64 > {
118
- vrf_key_hashes
119
- . iter ( )
120
- . map ( |key_hash| self . blocks_minted . get ( key_hash) . map ( |v| * v as u64 ) . unwrap_or ( 0 ) )
121
- . collect ( )
122
- }
123
-
124
116
/// Get epoch's total blocks minted for each vrf key hash till current block number
125
117
pub fn get_total_blocks_minted_by_pools ( & self , vrf_key_hashes : & Vec < KeyHash > ) -> Vec < u64 > {
126
118
vrf_key_hashes
@@ -330,10 +322,6 @@ mod tests {
330
322
let state = history. lock ( ) . await . get_current_state ( ) ;
331
323
assert_eq ! ( state. epoch_blocks, 1 ) ;
332
324
assert_eq ! ( state. epoch_fees, 123 ) ;
333
- assert_eq ! (
334
- 1 ,
335
- state. get_blocks_minted_by_pools( & vec![ keyhash( b"vrf_1" ) ] ) [ 0 ]
336
- ) ;
337
325
assert_eq ! (
338
326
3 ,
339
327
state. get_total_blocks_minted_by_pools( & vec![ keyhash( b"vrf_1" ) ] ) [ 0 ]
You can’t perform that action at this time.
0 commit comments