Post
Topic
Board Bitcoin Technical Support
Merits 5 from 3 users
Re: Abnormal BTC transfer in and out of address in the same block, how is possible?
by
o_e_l_e_o
on 13/06/2023, 07:42:36 UTC
⭐ Merited by ETFbitcoin (2) ,PawGo (2) ,Cricktor (1)
If I remember correctly, I think you can do this up to 24 transactions deep. After that, the default mempool will reject your transaction.
The stipulation is a maximum of 25 unconfirmed parents or 25 unconfirmed descendants, which means you can make a chain of 25 unconfirmed transactions, and it is the 26th transaction which will be rejected.

The code is here: https://github.com/bitcoin/bitcoin/blob/e9262ea32a6e1d364fb7974844fadc36f931f8c6/src/policy/policy.h#L58-L65

Note that these transactions don't necessarily have to be in a continuous chain. For example, if you tried to spend three inputs in a single transaction, with each of those inputs having 10 unconfirmed parents, then your transaction would be rejected since the total number of unconfirmed parents is 30.