rust-bitcoin / rust-bitcoincore-rpc

Rust RPC client library for the Bitcoin Core JSON-RPC API.
343 stars 258 forks source link

walletcreatefundedpsbt returns a "transaction amount too small" error with miniscript descriptor #292

Open wild-kard opened 1 year ago

wild-kard commented 1 year ago

Bitcoin Core Version: self compiled from master on Mar 30

rust-bitcoincore-rpc version: self compiled from master

I have generated a 2 of 7 miniscript descriptor and imported the descriptor into a blank wallet.

The wallet is funded.

However when attempting to use Client.wallet_create_funded_psbt()with Amount::from_sat(u64) in the outputs struct, I receive an error that says "Transaction amount too small".

I am able to successfully create a psbt with the same parameters using the bitcoin-cli.

I am using default fees and not specifying any inputs. The wallet contains two utxos for a total of 28k satoshis. I have tried various amounts between 10k and 25k sats but I always get the same error that says the transaction amount is too small.