We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 59f9299 + c1c8d75 commit 68357e0Copy full SHA for 68357e0
node/src/rpc_effectful/rpc_effectful_effects.rs
@@ -49,10 +49,9 @@ macro_rules! respond_or_log {
49
50
fn get_next_won_slot(state: &State) -> Option<BlockProductionAttemptWonSlot> {
51
let best_tip = state.transition_frontier.best_tip()?;
52
+ let cur_global_slot = state.cur_global_slot()?;
53
let vrf = state.block_producer.vrf_evaluator()?;
- let (_, won_slot) = vrf.won_slots.first_key_value()?;
54
-
55
- let won_slot = BlockProducerWonSlot::from_vrf_won_slot(won_slot, best_tip.genesis_timestamp());
+ let won_slot = vrf.next_won_slot(cur_global_slot, best_tip)?;
56
Some((&won_slot).into())
57
}
58
0 commit comments