<p>Given a transaction, there are inputs to that transaction which are spent to new outputs. The inputs themselves are outputs from a previous transaction. E.g. in tx 1, person A sends BTC to person B. Then, in tx 2, person B uses those outputs to create another transaction to person C.</p>
<ol>
<li>A -&gt; B</li>
<li>B -&gt; C</li>
</ol>
<p>Transaction 1 is an ancestor of transaction 2, because without transaction 1, #2 is not valid (the outputs do not exist). Likewise, transaction 2 is a descendant of transaction 1.</p>
<p>The RPC commands let you list ancestors/descendants of any given transaction, which are in the mempool (have not been mined and included in a block yet).</p>
<blockquote>
<p>getmempooldescendants &quot;txid&quot; ( verbose )</p>
<p>If txid is in the mempool, returns all in-mempool descendants.</p>
</blockquote>
<p>See <a href="https://bitcoincore.org/en/doc/0.18.0/rpc/blockchain/getmempooldescendants/" rel="nofollow noreferrer">getmempooldescendants</a></p>
<blockquote>
<p>getmempoolancestors &quot;txid&quot; ( verbose )</p>
</blockquote>
<p>If txid is in the mempool, returns all in-mempool ancestors.</p>
<p>See <a href="https://bitcoincore.org/en/doc/0.18.0/rpc/blockchain/getmempoolancestors/" rel="nofollow noreferrer">getmempoolancestors</a></p>

CC BY-SA 4.0
2019-09-04T13:08:02.653Z
2019-09-04T13:08:02.653Z
2020-06-16T11:10:03.350Z
JBaczuk
<p>is there a specific explanation about the differences between mempool anchestor dan descendants?</p>

<p>there are RPC commmand for "getmempoolanchestors" and "getmempooldescendents". What is mempool anchestor and decendents it self?</p>

<p>each node may have a different mempool size, but what are the differences of the mempool anchestor dan descendants?</p>

CC BY-SA 4.0
2019-08-20T07:26:39.967Z
Please edit your question and add some context. I would guess you mean transactions that depend on each other, but it appears as if you assume the mempools themselves are anchestors or descendants.
stefanwouldgo
<mempool>
What is differences of bitcoin mempool anchestor and descendant?
cocoklogi
# What is differences of bitcoin mempool anchestor and descendant?

(Asked by: username_0 on 2019-08-16)

is there a specific explanation about the differences between mempool anchestor dan descendants?

there are RPC commmand for "getmempoolanchestors" and "getmempooldescendents". What is mempool anchestor and decendents it self?

each node may have a different mempool size, but what are the differences of the mempool anchestor dan descendants?

**Tags:** mempool

> **Comments:**
> **username_1**: Please edit your question and add some context. I would guess you mean transactions that depend on each other, but it appears as if you assume the mempools themselves are anchestors or descendants.  

---

## 1 answers

### Answer by username_2 on 2019-09-04. Score: 4

Given a transaction, there are inputs to that transaction which are spent to new outputs. The inputs themselves are outputs from a previous transaction. E.g. in tx 1, person A sends BTC to person B. Then, in tx 2, person B uses those outputs to create another transaction to person C.

1. A -> B
2. B -> C

Transaction 1 is an ancestor of transaction 2, because without transaction 1, #2 is not valid (the outputs do not exist). Likewise, transaction 2 is a descendant of transaction 1.

The RPC commands let you list ancestors/descendants of any given transaction, which are in the mempool (have not been mined and included in a block yet).

> getmempooldescendants "txid" ( verbose )
>
> If txid is in the mempool, returns all in-mempool descendants.

See [getmempooldescendants](https://bitcoincore.org/en/doc/0.18.0/rpc/blockchain/getmempooldescendants/)

> getmempoolancestors "txid" ( verbose )

If txid is in the mempool, returns all in-mempool ancestors.

See [getmempoolancestors](https://bitcoincore.org/en/doc/0.18.0/rpc/blockchain/getmempoolancestors/)


---

