HomePhabricator

Merge #12803: Make BaseSignatureCreator a pure interface

Description

Merge #12803: Make BaseSignatureCreator a pure interface

Summary:
be67831 Make DummySignatureCreator a singleton (Pieter Wuille)
190b8d2 Make BaseSignatureCreator a pure interface (Pieter Wuille)

Pull request description:

  • Removes the m_provider field from BaseSignatureCreator. Instead both a SigningProvider (which provides keys and scripts) and a BaseSignatureCreator (which implements the transaction-specific (or other) signing logic) are passed into and down in ProduceSignature, making the two concepts orthogonal.
  • Makes BaseSignatureCreator a pure interface without constructor, making it easier to implement new derivations of it (for example for message signing).
  • As DummySignatureCreator now becomes a stateless object, turn it into a singleton DUMMY_SIGNATURE_CREATOR.

Tree-SHA512: 5f1f4512e4ea7d02a31df7b9ede55008efa716c5b74a2630ca1c2fc6599584d8bf5f5641487266127f4b3788033803539fbd22b03ef1219c83c10da2d3da3dcd

Backport of Core PR12803
https://github.com/bitcoin/bitcoin/pull/12803/

Depends on D3888

Test Plan:

make check
test_runner.py

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Apr 12 2018, 20:30
nakihitoCommitted on Aug 20 2019, 18:45
nakihitoPushed on Aug 20 2019, 18:45
Reviewer
Restricted Owners Package
Differential Revision
D3889: Merge #12803: Make BaseSignatureCreator a pure interface
Parents
rABC7f43e4a1dc29: [CMAKE] Add missing -DMAC_OSX definition
Branches
Unknown
Tags
Unknown