From a26367f3cb2f0c151dbdc20b9f3b04fc920d55f7 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sat, 17 Feb 2018 14:57:53 -0800 Subject: [PATCH] lnwallet: remove NewRawKey and FetchRootKey from the WalletController interface In this commit, we remove two methods from the WalletController interface which were previously used by the funding reservation process (NewRawKey) and the p2p network (FetchRootKey) in order to derive various keys for operation. This methods are no longer necessary as the KeyRing interface implements the functionality in a deterministic manner. --- lnwallet/interface.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lnwallet/interface.go b/lnwallet/interface.go index 17fec68c..58af4fd2 100644 --- a/lnwallet/interface.go +++ b/lnwallet/interface.go @@ -143,20 +143,6 @@ type WalletController interface { // error should be returned. GetPrivKey(a btcutil.Address) (*btcec.PrivateKey, error) - // NewRawKey returns a raw private key controlled by the wallet. These - // keys are used for the 2-of-2 multi-sig outputs for funding - // transactions, as well as the pub key used for commitment transactions. - // - // NOTE: The wallet MUST watch for on-chain outputs created to a p2wpkh - // script using keys returned by this function. - NewRawKey() (*btcec.PublicKey, error) - - // FetchRootKey returns a root key which will be used by the - // LightningWallet to deterministically generate secrets. The private - // key returned by this method should remain constant in-between - // WalletController restarts. - FetchRootKey() (*btcec.PrivateKey, error) - // SendOutputs funds, signs, and broadcasts a Bitcoin transaction // paying out to the specified outputs. In the case the wallet has // insufficient funds, or the outputs are non-standard, an error should