Skip to content
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

core: use block difficulty for genesis #23793

Merged
merged 4 commits into from
Oct 26, 2021

Commits on Oct 22, 2021

  1. core: write test showing that TD is not stored properly at genesis

    The ToBlock method applies a default value for an empty
    difficulty value. This default is not carried over through the Commit
    method because the TotalDifficulty database write writes the
    original difficulty value (nil) instead of the defaulty value
    present on the genesis Block.
    
    Date: 2021-10-22 08:25:32-07:00
    Signed-off-by: meows <b5c6@protonmail.com>
    meowsbits committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    90e3ffd View commit details
    Browse the repository at this point in the history
  2. core: write TD value from Block, not original genesis value

    This an issue where a default TD value was not written to
    the database, resulting in a 0 value TD at genesis.
    
    A test for this issue was provided at 90e3ffd
    
    Date: 2021-10-22 08:28:00-07:00
    Signed-off-by: meows <b5c6@protonmail.com>
    meowsbits committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    7d917a6 View commit details
    Browse the repository at this point in the history
  3. core: fix tests by adding GenesisDifficulty to expected result

    See prior two commits.
    
    Date: 2021-10-22 09:16:01-07:00
    Signed-off-by: meows <b5c6@protonmail.com>
    meowsbits committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    45013ca View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2021

  1. Configuration menu
    Copy the full SHA
    916da01 View commit details
    Browse the repository at this point in the history