btcsuite / btcd

An alternative full node bitcoin implementation written in Go (golang)
https://github.com/btcsuite/btcd/blob/master/README.md
ISC License
6.11k stars 2.32k forks source link

psbt: add verification method for utxo data #1964

Closed ziggie1984 closed 1 year ago

ziggie1984 commented 1 year ago

This adds a method to verify the utxo data of a psbt package especially the NonWitnessUtxo | WitnessUtxo data.

This will be used in other packages to make sure we have the correct psbt structure with all relevant input fields populated.

Relates to lightningnetwork/lnd#7527

Happy to discuss other approaches, other PRs which call this function in lnd and btcwallet would follow if we want this function in this package ?

ziggie1984 commented 1 year ago

Thank you for taking a look so fast, really appreciate this :)

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4476808113


Changes Missing Coverage Covered Lines Changed/Added Lines %
btcutil/psbt/utils.go 0 12 0.0%
<!-- Total: 0 12 0.0% -->
Files with Coverage Reduction New Missed Lines %
mempool/mempool.go 1 66.75%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 4326890213: -0.01%
Covered Lines: 26650
Relevant Lines: 48216

💛 - Coveralls