From 4a277276fd9ae6731322e5ea5b89ff808e674399 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 23 Nov 2017 00:28:56 -0600 Subject: [PATCH] lnwallet: update SendOutputs method on WalletController to accept fee In this commit, we extend the existing SendOutputs method on the WalletController interface to be able to accept a custom fee. With this, users are now able to specify their exact fee, allowing the wallet to be fee estimation agnostic. --- lnwallet/interface.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lnwallet/interface.go b/lnwallet/interface.go index ad5d2ecb..af86ebf3 100644 --- a/lnwallet/interface.go +++ b/lnwallet/interface.go @@ -151,9 +151,11 @@ type WalletController interface { // 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 be returned. - SendOutputs(outputs []*wire.TxOut) (*chainhash.Hash, error) + // insufficient funds, or the outputs are non-standard, an error should + // be returned. This method also takes the target fee expressed in + // sat/byte that should be used when crafting the transaction. + SendOutputs(outputs []*wire.TxOut, + feeSatPerByte btcutil.Amount) (*chainhash.Hash, error) // ListUnspentWitness returns all unspent outputs which are version 0 // witness programs. The 'confirms' parameter indicates the minimum