From d47f67d260271a173e94750c10991fd7fb663809 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 10 Dec 2019 09:48:13 +0100 Subject: [PATCH] signrpc+subserver: add key chain to signer --- lnrpc/signrpc/config_active.go | 5 +++++ subrpcserver_config.go | 3 +++ 2 files changed, 8 insertions(+) diff --git a/lnrpc/signrpc/config_active.go b/lnrpc/signrpc/config_active.go index 1e959ae4..c5ce25a9 100644 --- a/lnrpc/signrpc/config_active.go +++ b/lnrpc/signrpc/config_active.go @@ -4,6 +4,7 @@ package signrpc import ( "github.com/lightningnetwork/lnd/input" + "github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/macaroons" ) @@ -30,4 +31,8 @@ type Config struct { // job of the signer RPC server is simply to proxy valid requests to // the active signer instance. Signer input.Signer + + // KeyRing is an interface that the signer will use to derive any keys + // for signing messages. + KeyRing keychain.SecretKeyRing } diff --git a/subrpcserver_config.go b/subrpcserver_config.go index d00e3a43..87b0378c 100644 --- a/subrpcserver_config.go +++ b/subrpcserver_config.go @@ -130,6 +130,9 @@ func (s *subRPCServerConfigs) PopulateDependencies(cc *chainControl, subCfgValue.FieldByName("Signer").Set( reflect.ValueOf(cc.signer), ) + subCfgValue.FieldByName("KeyRing").Set( + reflect.ValueOf(cc.keyRing), + ) case *walletrpc.Config: subCfgValue := extractReflectValue(subCfg)