<p>From the <a href="https://bitcoincore.org/en/doc/0.19.0/rpc/wallet/listunspent/" rel="nofollow noreferrer">documentation</a>:</p>

<blockquote>
  <p><code>listunspent ( minconf maxconf ["address",...] include_unsafe query_options )</code></p>
  
  <p>Returns array of unspent transaction outputs
  with between minconf and maxconf (inclusive) confirmations.</p>
</blockquote>

<p>so <code>listunspent 3</code> would work for you?</p>

CC BY-SA 4.0
2020-05-14T10:40:40.010Z
Yes that's what I do now, but I was wondering if there was a way to modify the `safe` parameter to totally avoid the risk of picking an UTXO that have less than x confirmations in a transaction.
You can also use the `lockunspent` command for the same purpose.
Sosthène
CC BY-SA 4.0
2020-05-14T11:36:39.690Z
You'd need to recompile Core for that.
MCCCS
CC BY-SA 4.0
2020-05-07T13:26:14.043Z
2020-05-07T13:26:14.043Z
MCCCS
<p>I noticed that when I call <code>listunspent</code> on Bitcoin Core, UTXO with 0 confirmation are labeled <code>unsafe</code>, and thus prevented from being spent with <code>sendtoaddress</code> or <code>fundrawtransaction</code>. As soon as there's one confirmation the tx is <code>safe</code> and I can spend it.</p>

<p>Being able to modify the target for a tx to be considered <code>safe</code>, for example set it to 3 or 6 confirmations instead of just 1, would make my life easier, but I can't find an option for it. Is there some way to do it?</p>

CC BY-SA 4.0
2020-06-06T14:06:04.283Z
You could set `minconf=3` or `minconf=6` for that matter; you can also parse depending on the `confirmations` field instead of the `safe` one.
Antoine Poinsot
<bitcoin-core><confirmations>
Modify the number of confirmations for an utxo to be ```safe == true``` in Bitcoin Core
Sosthène
# Modify the number of confirmations for an utxo to be ```safe == true``` in Bitcoin Core

(Asked by: username_0 on 2020-05-07)

I noticed that when I call `listunspent` on Bitcoin Core, UTXO with 0 confirmation are labeled `unsafe`, and thus prevented from being spent with `sendtoaddress` or `fundrawtransaction`. As soon as there's one confirmation the tx is `safe` and I can spend it.

Being able to modify the target for a tx to be considered `safe`, for example set it to 3 or 6 confirmations instead of just 1, would make my life easier, but I can't find an option for it. Is there some way to do it?

**Tags:** bitcoin-core, confirmations

> **Comments:**
> **username_1**: You could set `minconf=3` or `minconf=6` for that matter; you can also parse depending on the `confirmations` field instead of the `safe` one.  

---

## 1 answers

### Answer by username_2 on 2020-05-07. Score: 0 | Accepted answer

From the [documentation](https://bitcoincore.org/en/doc/0.19.0/rpc/wallet/listunspent/):

> `listunspent ( minconf maxconf ["address",...] include_unsafe query_options )`
>
> Returns array of unspent transaction outputs
> with between minconf and maxconf (inclusive) confirmations.

so `listunspent 3` would work for you?

> **Comments:**
> **username_0**: Yes that's what I do now, but I was wondering if there was a way to modify the `safe` parameter to totally avoid the risk of picking an UTXO that have less than x confirmations in a transaction. You can also use the `lockunspent` command for the same purpose.  
> **username_2**: You'd need to recompile Core for that.  

---

