From d40f06a3da5e6b1fd065885b08513263fa930cb8 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 17 Mar 2018 19:19:09 -0700 Subject: Introduce interface for signing providers CKeyStore is a rich interface that provides many features, including knowledge of scripts and pubkeys for solving, private keys for signing, in addition to watch-only keys and scripts, and distinguishing lack of keys from them just being encrypted. The signing logic in script/sign does not actually need most of these features. Here we introduce a simpler interface (SigningProvider) which *only* provides keys and scripts. This is actually sufficient for signing. In addtion, we swap the dependency between keystore and script/sign (keystore now depends on script/script with CKeyStore deriving from SigningProvider, rather than CKeyStore being the interface that signing relies on). --- src/script/sign.h | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'src/script/sign.h') diff --git a/src/script/sign.h b/src/script/sign.h index 2c749521cd..c301f0544f 100644 --- a/src/script/sign.h +++ b/src/script/sign.h @@ -8,21 +8,32 @@ #include