mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 12:01:27 +02:00
multi: add coin selection strategy option to all on-chain rpcs
In this commit, we add the coin selection strategy option to the following on-chain RPCs `fundpsbt`, `batchopenchannel`, `estimatefee`, `sendcoins`, `sendmany`, and `sendoutputs`.
This commit is contained in:
@@ -73,7 +73,8 @@ var (
|
||||
// This is a part of the WalletController interface.
|
||||
func (b *BtcWallet) FundPsbt(packet *psbt.Packet, minConfs int32,
|
||||
feeRate chainfee.SatPerKWeight, accountName string,
|
||||
changeScope *waddrmgr.KeyScope) (int32, error) {
|
||||
changeScope *waddrmgr.KeyScope,
|
||||
strategy wallet.CoinSelectionStrategy) (int32, error) {
|
||||
|
||||
// The fee rate is passed in using units of sat/kw, so we'll convert
|
||||
// this to sat/KB as the CreateSimpleTx method requires this unit.
|
||||
@@ -134,7 +135,7 @@ func (b *BtcWallet) FundPsbt(packet *psbt.Packet, minConfs int32,
|
||||
// the partial TX information in the packet.
|
||||
return b.wallet.FundPsbt(
|
||||
packet, keyScope, minConfs, accountNum, feeSatPerKB,
|
||||
b.cfg.CoinSelectionStrategy, opts...,
|
||||
strategy, opts...,
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user