-
Notifications
You must be signed in to change notification settings - Fork 230
Lb/flexible solution base #788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
003fe1b to
13a60cf
Compare
apps/arweave/src/ar_node_worker.erl
Outdated
| Solution2 -> | ||
| {PrevB, Solution2} | ||
| end; | ||
| pick_prev_block_for_solution3(Solution, Source, [], PrevBlocks) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite follow why we need both pick_prev_block_for_solution2 and pick_prev_block_for_solution3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pick_prev_block_for_solution2 looks for our blocks among the FrontBlocks
pick_prev_block_for_solution3 runs when there are none of our blocks in FrontBlocks, it goes block by block checking if we can put the new block on top; if there are no suitable blocks, it looks for our block among their (FrontBlock's) previous blocks
pick_prev_block_for_solution4 runs when there are none of our blocks among FrontBlock's previous blocks, it iterates over previous blocks
I will try to make it more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rearranged and renamed the functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
7206252 to
0b60ea0
Compare
4386ac7 to
54cb890
Compare
Useful when the previous block changes the VDF session.
Track such blocks along with confirmed_block's (block_mined_but_orphaned key).
54cb890 to
de90abb
Compare
Put each test in a separate module to ensure clean shutdown on CI.
No description provided.