rename slot_num
This commit is contained in:
parent
a33921ed34
commit
cc2227d943
|
@ -156,14 +156,14 @@ fn process_block(
|
||||||
for entry in entries {
|
for entry in entries {
|
||||||
let (res, fee) = process_entry(bank, entry);
|
let (res, fee) = process_entry(bank, entry);
|
||||||
let num_ticks = bank.tick_height();
|
let num_ticks = bank.tick_height();
|
||||||
let slot_num = leader_scheduler
|
let slot_height = leader_scheduler
|
||||||
.read()
|
.read()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.tick_height_to_slot(num_ticks);
|
.tick_height_to_slot(num_ticks);
|
||||||
if let Some(leader) = leader_scheduler
|
if let Some(leader) = leader_scheduler
|
||||||
.read()
|
.read()
|
||||||
.unwrap()
|
.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
|
// Credit the accumulated fees to the current leader and reset the fee to 0
|
||||||
bank.deposit(&leader, fee);
|
bank.deposit(&leader, fee);
|
||||||
|
|
|
@ -127,14 +127,14 @@ impl ReplayStage {
|
||||||
|
|
||||||
if 0 == num_ticks_to_next_vote {
|
if 0 == num_ticks_to_next_vote {
|
||||||
subscriptions.notify_subscribers(&bank);
|
subscriptions.notify_subscribers(&bank);
|
||||||
let slot_num = leader_scheduler
|
let slot_height = leader_scheduler
|
||||||
.read()
|
.read()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.tick_height_to_slot(num_ticks);
|
.tick_height_to_slot(num_ticks);
|
||||||
if let Some(leader) = leader_scheduler
|
if let Some(leader) = leader_scheduler
|
||||||
.read()
|
.read()
|
||||||
.unwrap()
|
.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
|
// Credit the accumulated fees to the current leader and reset the fee to 0
|
||||||
bank.deposit(&leader, *fees);
|
bank.deposit(&leader, *fees);
|
||||||
|
|
Loading…
Reference in New Issue