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.
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.
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.
Rearranged and renamed the functions
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.