Skip to content

Commit

Permalink
GH-1523 GH-1631 Transition from dpos to hotstuff
Browse files Browse the repository at this point in the history
Add comment to schedule_lib_num. Do not want to rename as to not break clients that expect schedule_lib_num name.
  • Loading branch information
heifner committed Sep 14, 2023
1 parent bf3b284 commit 718e17d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libraries/chain/include/eosio/chain/block_header_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ namespace detail {
};

struct schedule_info {
uint32_t schedule_lib_num = 0; /// last irr block num
// schedule_lib_num is compared with dpos lib, but the value is actually current block at time of pending
// After hotstuff is activated, schedule_lib_num is compared to next().next() round for determination of
// changing from pending to active.
uint32_t schedule_lib_num = 0; /// block_num of pending
digest_type schedule_hash;
producer_authority_schedule schedule;
};
Expand Down Expand Up @@ -133,7 +136,7 @@ struct pending_block_header_state : public detail::block_header_state_common {
* block_header.new_producers = producers
*
* create_block_state ->
* block_state.schedule_lib_num = current_block_num
* block_state.schedule_lib_num = current_block_num (note this should be named schedule_block_num)
* block_state.pending_schedule.schedule = producers
*
* start_block ->
Expand Down

0 comments on commit 718e17d

Please sign in to comment.