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

Add blockchain.NewUtxoEntry() #1588

Merged
merged 1 commit into from
Jun 15, 2020
Merged

Commits on Jun 8, 2020

  1. Add blockchain.NewUtxoEntry() to directly create entries for UtxoView…

    …point
    
    The current methods to add to a UtxoViewpoint don't allow for a situation where
    we have only UTXO data but not a whole transaction.  This commit allows
    contstruction of a UtxoEntry without requiring a full MsgTx.
    
    AddTxOut() and AddTxOuts() both require a whole transaction, including the inputs,
    which are only used in order to calculate the txid.  In some situations, such as
    with use of the utreexo accumulator, we only have the utxo data but not the
    transaction which created it.
    
    For reference, utreexo's initial usage of the blockchain.NewUtxoEntry() function is at
    https://github.com/mit-dci/utreexo/pull/135/files#diff-3f7b8f9991ea957f1f4ad9f5a95415f0R96
    adiabat committed Jun 8, 2020
    Configuration menu
    Copy the full SHA
    478efed View commit details
    Browse the repository at this point in the history