HomePhabricator

psbt: handle unspendable psbts

Description

psbt: handle unspendable psbts

Summary:

  • Have a PSBTAnalysis state that indicates invalid PSBT

Invalid PSBTs need to be re-created, so the next role is the
Creator (new PSBTRole). Additionally, we need to know what went
wrong so an error field was added to PSBTAnalysis.

A PSBTAnalysis indicating invalid will have empty everything,
next will be set to PSBTRole::CREATOR, and an error message.

  • Mark PSBTs spending unspendable outputs as invalid in analysis

This is a backport of Core PR17524

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8065

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Nov 19 2019, 19:35
deadalnixCommitted on Oct 23 2020, 10:47
deadalnixPushed on Oct 23 2020, 10:48
Reviewer
Restricted Project
Differential Revision
D8065: psbt: handle unspendable psbts
Parents
rABC06a61dcb12a4: [backport#16577] util: CBufferedFile fixes
Branches
Unknown
Tags
Unknown

Event Timeline