rename slot_num

This commit is contained in:
Pankaj Garg 2019-02-19 17:13:40 -08:00 committed by Greg Fitzgerald
parent a33921ed34
commit cc2227d943
2 changed files with 4 additions and 4 deletions

View File

@ -156,14 +156,14 @@ fn process_block(
for entry in entries {
let (res, fee) = process_entry(bank, entry);
let num_ticks = bank.tick_height();
let slot_num = leader_scheduler
let slot_height = leader_scheduler
.read()
.unwrap()
.tick_height_to_slot(num_ticks);
if let Some(leader) = leader_scheduler
.read()
.unwrap()
.get_leader_for_slot(slot_num)
.get_leader_for_slot(slot_height)
{
// Credit the accumulated fees to the current leader and reset the fee to 0
bank.deposit(&leader, fee);

View File

@ -127,14 +127,14 @@ impl ReplayStage {
if 0 == num_ticks_to_next_vote {
subscriptions.notify_subscribers(&bank);
let slot_num = leader_scheduler
let slot_height = leader_scheduler
.read()
.unwrap()
.tick_height_to_slot(num_ticks);
if let Some(leader) = leader_scheduler
.read()
.unwrap()
.get_leader_for_slot(slot_num)
.get_leader_for_slot(slot_height)
{
// Credit the accumulated fees to the current leader and reset the fee to 0
bank.deposit(&leader, *fees);