<p>There is no limit in the consensus rules about that. However nodes have a local policy rule about this. In Bitcoin Core, the limit is 25 unconfirmed transactions. This limit is user configurable.</p>

CC BY-SA 4.0
2021-01-12T11:42:05.170Z
How does one increase the limit? What is the bitcoin.conf setting?
qmux
CC BY-SA 4.0
2021-01-12T11:44:13.777Z
I'm also curious why it never seems possible for me to reach anywhere near that limit of 25 unconfirmed transactions, before getting an 'Insufficient Funds' error. What other factors are at play here? How does one go about increasing chains in such cases, without using `createrawtransaction`?
qmux
CC BY-SA 4.0
2021-01-12T16:22:53.867Z
@qmux You will need to increase the `-limitacnestorcount`, `-limitancestorsize`, `-limitdescendantcount`, and `-limitdescendantsize` settings to increase the limit. The Bitcoin Core wallet may be unable to reach the limit because the wallet operates with different, stricter limits.
Ava Chow
CC BY-SA 4.0
2021-01-12T21:02:23.227Z
This looks to be exactly what I’m looking for, thanks. What does usage of these configuration arguments look like? E.g. for ‘-limitancestorcount’, should this be added as a parameter in ‘bitcoin-cli sendmany {..output data} -limitancestorcount 20’ like so?
qmux
CC BY-SA 4.0
2021-01-12T21:27:23.170Z
These are options to `bitcoind`. You either add them to the bitcoin.conf as, e.g. `limitancestorcount=30`, or to the command to start, e.g. `bitcoind -limitancestorcount=30`.
Ava Chow
CC BY-SA 4.0
2021-01-12T22:53:17.063Z
I set both limitancestorcount=50 and limitdescendantcount=50 in bitcoin.conf, as well as  spendzeroconfcharge=1 and restarted bitcoind- still facing the same ‘Insufficient Funds’ error. Could it be because I’m missing the descendantsize/ancestorsize config or is there likely another issue here?
qmux
CC BY-SA 4.0
2021-01-12T23:05:32.613Z
Insufficient funds is unrelated to the unconfirmed children limit. Increasing it won't have any effect on that. Even if the wallet knows about a transaction, it may not choose to use it for creating new transactions. The wallet has additional rules on what inputs may be selected. It doesn't just choose things if it knows about them because that may not be safe.
Ava Chow
CC BY-SA 4.0
2021-01-12T23:26:51.500Z
What would be the best resources you’d recommend to help with understanding how to configure bitcoin core in such a way that it does choose to select unconfirmed transactions (those in question here only have a ‘chain’ of one 0 conf). Why would bitcoin core refuse to broadcast these transactions, especially when in the past days there’s not been any issue with submitting almost identical CPFP transactions with bitcoin core configured identically?
qmux
CC BY-SA 4.0
2021-01-12T23:38:38.080Z
There are no such resources as there is no way to configure the coin selection algorithm like that. At best, you will only be able to spend unconfirmed change. Bitcoin Core does not spend from incoming unconfirmed transactions because it is unsafe to do so. The node and wallet operate fairly independently - something that is accepted by the node may not be able to be created by the wallet. The wallet isn't refusing to broadcast anything, it is refusing to create it in the first place.
Ava Chow
CC BY-SA 4.0
2021-01-12T23:59:24.870Z
Sorry, I should have been more clear - all utxos I’m looking to spend here are unconfirmed change outputs from the same wallet. Thanks for the clarification regarding the relationship between the wallet/node. As you described, the problem I’m facing appears to be the wallet refusing to include unconfirmed change output in successive transactions. What would be the best way of getting around this?
qmux
CC BY-SA 4.0
2021-01-13T02:23:27.387Z
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/118398/discussion-between-qmux-and-andrew-chow).
qmux
CC BY-SA 3.0
2017-11-17T22:59:16.300Z
2017-11-17T22:59:16.300Z
Ava Chow
<p>I don't seem to be able to ask the right question in the title, the way I asked the question is not correct.<br>
What I really want to know is this:  </p>

<p>I can spend an unconfirmed output, then I can spend the output that spends that unconfirmed output, and I can spend that output, too, and so on...  </p>

<p>My question is: how many times can I do it?  </p>

<p><img src="https://i.sstatic.net/T9IDL.png" alt=""></p>

<p><strong>Edit:</strong> I just tried it in the testnet, I got this message: <code>64: too-long-mempool-chain</code>. Is this 64 an universal number?<br>
<strong>Edit 2:</strong> <a href="https://github.com/bitcoin/bitcoin/issues/10004#issuecomment-345383285" rel="nofollow noreferrer">It turns</a> out 64 is the error code. The actual number is 25.</p>

<unconfirmed-transactions>
How many unconfirmed childs can I have?
nopara73
# How many unconfirmed childs can I have?

(Asked by: username_0 on 2017-11-17)

I don't seem to be able to ask the right question in the title, the way I asked the question is not correct.  
What I really want to know is this:

I can spend an unconfirmed output, then I can spend the output that spends that unconfirmed output, and I can spend that output, too, and so on...

My question is: how many times can I do it?

![](https://i.sstatic.net/T9IDL.png)

**Edit:** I just tried it in the testnet, I got this message: `64: too-long-mempool-chain`. Is this 64 an universal number?  
**Edit 2:** [It turns](https://github.com/bitcoin/bitcoin/issues/10004#issuecomment-345383285) out 64 is the error code. The actual number is 25.

**Tags:** unconfirmed-transactions


---

## 1 answers

### Answer by username_1 on 2017-11-17. Score: 3 | Accepted answer

There is no limit in the consensus rules about that. However nodes have a local policy rule about this. In Bitcoin Core, the limit is 25 unconfirmed transactions. This limit is user configurable.

> **Comments:**
> **username_2**: How does one increase the limit? What is the bitcoin.conf setting?  
> **username_2**: I'm also curious why it never seems possible for me to reach anywhere near that limit of 25 unconfirmed transactions, before getting an 'Insufficient Funds' error. What other factors are at play here? How does one go about increasing chains in such cases, without using `createrawtransaction`?  
> **username_1**: @username_2 You will need to increase the `-limitacnestorcount`, `-limitancestorsize`, `-limitdescendantcount`, and `-limitdescendantsize` settings to increase the limit. The Bitcoin Core wallet may be unable to reach the limit because the wallet operates with different, stricter limits.  
> **username_2**: This looks to be exactly what I’m looking for, thanks. What does usage of these configuration arguments look like? E.g. for ‘-limitancestorcount’, should this be added as a parameter in ‘bitcoin-cli sendmany {..output data} -limitancestorcount 20’ like so?  
> **username_1**: These are options to `bitcoind`. You either add them to the bitcoin.conf as, e.g. `limitancestorcount=30`, or to the command to start, e.g. `bitcoind -limitancestorcount=30`.  
> **username_2**: I set both limitancestorcount=50 and limitdescendantcount=50 in bitcoin.conf, as well as  spendzeroconfcharge=1 and restarted bitcoind- still facing the same ‘Insufficient Funds’ error. Could it be because I’m missing the descendantsize/ancestorsize config or is there likely another issue here?  
> **username_1**: Insufficient funds is unrelated to the unconfirmed children limit. Increasing it won't have any effect on that. Even if the wallet knows about a transaction, it may not choose to use it for creating new transactions. The wallet has additional rules on what inputs may be selected. It doesn't just choose things if it knows about them because that may not be safe.  
> **username_2**: What would be the best resources you’d recommend to help with understanding how to configure bitcoin core in such a way that it does choose to select unconfirmed transactions (those in question here only have a ‘chain’ of one 0 conf). Why would bitcoin core refuse to broadcast these transactions, especially when in the past days there’s not been any issue with submitting almost identical CPFP transactions with bitcoin core configured identically?  
> **username_1**: There are no such resources as there is no way to configure the coin selection algorithm like that. At best, you will only be able to spend unconfirmed change. Bitcoin Core does not spend from incoming unconfirmed transactions because it is unsafe to do so. The node and wallet operate fairly independently - something that is accepted by the node may not be able to be created by the wallet. The wallet isn't refusing to broadcast anything, it is refusing to create it in the first place.  
> **username_2**: Sorry, I should have been more clear - all utxos I’m looking to spend here are unconfirmed change outputs from the same wallet. Thanks for the clarification regarding the relationship between the wallet/node. As you described, the problem I’m facing appears to be the wallet refusing to include unconfirmed change output in successive transactions. What would be the best way of getting around this?  
> **username_2**: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/118398/discussion-between-username_2-and-andrew-username_1).  

---

