Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Switch all applicable code over to using new block_info #1101

Merged
merged 1 commit into from Nov 16, 2021

Conversation

Vagabond
Copy link
Member

Additionally add get_block_info/2 to ledger to correspond with the
current ledger get_block/2.

Additionally add get_block_info/2 to ledger to correspond with the
current ledger get_block/2.
@@ -717,8 +719,7 @@ get_blocks(Chain) ->
DLedger = blockchain_ledger_v1:mode(delayed, Ledger),
{ok, DHeight0} = blockchain_ledger_v1:current_height(DLedger),

{ok, DBlock} = blockchain:get_block(DHeight0, Chain),
{_, DHeight} = blockchain_block_v1:election_info(DBlock),
{ok, #block_info_v2{election_info={_, DHeight}}} = blockchain:get_block_info(DHeight0, Chain),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What’s the difference between blockchain:get_block_info/2 and blockchain_ledger_v1:get_block_info/2?

@evanmcc evanmcc merged commit c0d82dc into andymck/upgrade-block-info-v2 Nov 16, 2021
@evanmcc evanmcc deleted the adt/use-new-block-info branch November 16, 2021 18:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants