Compare commits

...

1 commit

Author SHA1 Message Date
pbattu123
edeef6ab7e fix verify witness signature method 2020-02-26 10:54:38 -04:00

View file

@ -313,7 +313,7 @@ void database::verify_signing_witness( const signed_block& new_block, const fork
witness_id_type wid; witness_id_type wid;
const witness_schedule_object& wso = get_witness_schedule_object(); const witness_schedule_object& wso = get_witness_schedule_object();
// ask the near scheduler who goes in the given slot // ask the near scheduler who goes in the given slot
bool slot_is_near = wso.scheduler.get_slot(slot_num-1, wid); bool slot_is_near = wso.scheduler.get_slot(slot_num, wid);
if(! slot_is_near) if(! slot_is_near)
{ {
// if the near scheduler doesn't know, we have to extend it to // if the near scheduler doesn't know, we have to extend it to
@ -325,7 +325,7 @@ void database::verify_signing_witness( const signed_block& new_block, const fork
far_future_witness_scheduler far_scheduler = far_future_witness_scheduler far_scheduler =
far_future_witness_scheduler(wso.scheduler, far_rng); far_future_witness_scheduler(wso.scheduler, far_rng);
if(!far_scheduler.get_slot(slot_num-1, wid)) if(!far_scheduler.get_slot(slot_num, wid))
{ {
// no scheduled witness -- somebody set up us the bomb // no scheduled witness -- somebody set up us the bomb
// n.b. this code path is impossible, the present // n.b. this code path is impossible, the present