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:
Mohamed Awnallah
2024-03-26 19:08:27 +02:00
parent a0b0e7aa62
commit 1a2d50d385
11 changed files with 107 additions and 40 deletions

View File

@@ -146,14 +146,16 @@ func (w *mockWalletController) ImportTaprootScript(waddrmgr.KeyScope,
// SendOutputs currently returns dummy values.
func (w *mockWalletController) SendOutputs([]*wire.TxOut,
chainfee.SatPerKWeight, int32, string) (*wire.MsgTx, error) {
chainfee.SatPerKWeight, int32, string,
base.CoinSelectionStrategy) (*wire.MsgTx, error) {
return nil, nil
}
// CreateSimpleTx currently returns dummy values.
func (w *mockWalletController) CreateSimpleTx([]*wire.TxOut,
chainfee.SatPerKWeight, int32, bool) (*txauthor.AuthoredTx, error) {
chainfee.SatPerKWeight, int32, base.CoinSelectionStrategy,
bool) (*txauthor.AuthoredTx, error) {
return nil, nil
}
@@ -214,7 +216,8 @@ func (w *mockWalletController) ListLeasedOutputs() (
// FundPsbt currently does nothing.
func (w *mockWalletController) FundPsbt(*psbt.Packet, int32,
chainfee.SatPerKWeight, string, *waddrmgr.KeyScope) (int32, error) {
chainfee.SatPerKWeight, string, *waddrmgr.KeyScope,
base.CoinSelectionStrategy) (int32, error) {
return 0, nil
}