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

blockchain: Simplify blocknode construction. #1056

Merged

Commits on Feb 19, 2018

  1. blockchain: Separate node ticket info population.

    This separates the logic for populating the stake information in a block
    node from the construction of the node in order to better delineate the
    difference between the two and to pave the way for that information to
    be stored separately in the database versus needing to load full blocks
    to retrieve it.
    davecgh committed Feb 19, 2018
    Copy the full SHA
    ca9ff29 View commit details
    Browse the repository at this point in the history
  2. blockchain: Accept parent in blockNode constructor.

    This modifies the newBlockNode function to accept the parent as an
    argument to automatically connect the newly created node.  When it is
    not nil, the work sum will automatically be summed and the parent of the
    new node will be set accordingly.
    
    This simplifies the block node construction a bit and allows some
    redundant code to be removed.  It also paves the way for easier simpler
    full block index construction in the future.
    davecgh committed Feb 19, 2018
    Copy the full SHA
    cb40146 View commit details
    Browse the repository at this point in the history