<p>So I'm trying to set up a full bitcoin node. I compiled bitcoin core fine and I created a config file. I want to download the entire history of the blockchain, so I created a bitcoin.conf file in my ./bitcoin folder (the folder that I cloned from github). My file originally looked like:</p>
<pre><code>txindex=1
prune=9
maxconnections=15
dbcache=150
maxmempool=150
maxreceivebuffer=2500
maxsendbuffer=500
</code></pre>
<p>Then I ran bitcoind -daemon but realized that when I was running <code>bitcoin-cli getrawtransaction 32892hf9nvh9832948294383</code> (fake tx number) that it was returning an error saying that there is no such mempool transaction. I realized my mistake was putting <code>prune</code> in my bitcoin.conf file. So I removed that line so that my file now looks like:</p>
<pre><code>txindex=1
maxconnections=15
dbcache=150
maxmempool=150
maxreceivebuffer=2500
maxsendbuffer=500
</code></pre>
<p>Then I ran <code>bitcoin-cli stop</code>, then ran <code>bitcoind -daemon -reindex</code>. I thought this would be fine, but I'm still getting that no mempool transaction error when I try looking at that same transaction - and I verified that the process of download the blockchain has already moved past that transaction date because I ran <code>bitcoin-cli getblockchaininfo</code> and I looked at the time key.</p>
<p>Do I have to wait for the entire blockchain to be downloaded before I run these commands? I'd like to know before I waste a bunch of time doing this the wrong way.</p>
<p>I appreciate your help - thanks!</p>

CC BY-SA 4.0
2023-09-29T02:38:45.800Z
I realized I misinterpreted your question, focusing on the error message rather than what you're doing. Normally, the `getrawtransaction <txid>` RPC only works for mempool transactions, but with txindex enabled it should work for confirmed transactions too. My guess is that perhaps the txindex hasn't caught up with synchronization so it's giving that error still, but I'm not entirely sure what's going on.
Pieter Wuille
CC BY-SA 4.0
2023-09-29T02:49:19.073Z
@PieterWuille as long as my config file is looking fine then I'm willing to wait it out and see if it works.
Jonathan Gafar
<bitcoin-core><bitcoind><full-node><bitcoin-cli>
bitcoin-cli getrawtransaction not working as expected?
Jonathan Gafar
# bitcoin-cli getrawtransaction not working as expected?

(Asked by: username_0 on 2023-09-29)

So I'm trying to set up a full bitcoin node. I compiled bitcoin core fine and I created a config file. I want to download the entire history of the blockchain, so I created a bitcoin.conf file in my ./bitcoin folder (the folder that I cloned from github). My file originally looked like:

```
txindex=1
prune=9
maxconnections=15
dbcache=150
maxmempool=150
maxreceivebuffer=2500
maxsendbuffer=500

```

Then I ran bitcoind -daemon but realized that when I was running `bitcoin-cli getrawtransaction 32892hf9nvh9832948294383` (fake tx number) that it was returning an error saying that there is no such mempool transaction. I realized my mistake was putting `prune` in my bitcoin.conf file. So I removed that line so that my file now looks like:

```
txindex=1
maxconnections=15
dbcache=150
maxmempool=150
maxreceivebuffer=2500
maxsendbuffer=500

```

Then I ran `bitcoin-cli stop`, then ran `bitcoind -daemon -reindex`. I thought this would be fine, but I'm still getting that no mempool transaction error when I try looking at that same transaction - and I verified that the process of download the blockchain has already moved past that transaction date because I ran `bitcoin-cli getblockchaininfo` and I looked at the time key.

Do I have to wait for the entire blockchain to be downloaded before I run these commands? I'd like to know before I waste a bunch of time doing this the wrong way.

I appreciate your help - thanks!

**Tags:** bitcoin-core, bitcoind, full-node, bitcoin-cli

> **Comments:**
> **username_1**: I realized I misinterpreted your question, focusing on the error message rather than what you're doing. Normally, the `getrawtransaction <txid>` RPC only works for mempool transactions, but with txindex enabled it should work for confirmed transactions too. My guess is that perhaps the txindex hasn't caught up with synchronization so it's giving that error still, but I'm not entirely sure what's going on.  
> **username_0**: @username_1 as long as my config file is looking fine then I'm willing to wait it out and see if it works.  

---

## 0 answers

