I would like to create a psbt using walletcreatefundedpsbt spending unconfirmed ouptputs. Is this possible?

When I call that RPC command with 0 confirmed balance but with sufficient unconfirmed outputs, I get an Insufficient funds error.

Thanks in advance!

  • Are the unconfirmed inputs from incoming outputs or change outputs? If they are incoming, Bitcoin Core will not select them for transactions.
    – Ava Chow
    Commented Jul 14, 2019 at 4:38
  • Incoming. Is it true that Bitcoin Core's coin selection algorithm won't select unconfirmed incoming outputs in general?
    – justinmoon
    Commented Jul 14, 2019 at 5:24

1 Answer 1


Bitcoin Core will never select unconfirmed incoming outputs. These are always considered to be untrusted and not safe for coin selection. This applies to any transactions that Bitcoin Core creates, including those created by using walletcreatefundedpsbt or fundrawtransaction.

For a code reference, the AvailableCoins function is used to fetch and filter the coins available for coin selection which calls the IsTrusted function for every available output (well really transaction stored in the wallet which include incoming and outgoing transactions). If the transaction was not created by that wallet, it is considered not trusted, so IsTrusted returns false which results in AvailableCoins excluding all of that transaction's outputs from the set of outputs used for coin selection.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.