Page MenuHomePhabricator

Merge #12803: Make BaseSignatureCreator a pure interface
ClosedPublic

Authored by nakihito on Aug 15 2019, 22:58.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Aug 15 2019, 22:59
This revision is now accepted and ready to land.Aug 20 2019, 08:57