<p>Assuming this is identical to Bitcoin Core.</p>
<p>This is somewhat confusing, but it simply means that UTXO is spent. It is reporting &quot;nothing&quot; as output.</p>

CC BY-SA 4.0
2021-05-03T17:12:41.693Z
Yep very confusing. Also yes it is completly identical to bitcoin core actually. What im asking myself is what the exact difference between `-reindex` & `-reindex-chainstate` is. Maybe this is the cause of all of that
UnknownHex64
CC BY-SA 4.0
2021-05-03T17:13:59.637Z
-reindex scans all block data again; -reindex-chainstate assumes your blocks are fine. It sounds unrelated to your question - there is nothing wrong here. The output you're asking about simply has been spent already.
Pieter Wuille
CC BY-SA 4.0
2021-05-03T17:21:17.340Z
Ahh okay. So what method is the correct one to simply check a transaction? [Confirmations etc]
UnknownHex64
CC BY-SA 4.0
2021-05-03T17:23:30.207Z
gettransaction (only works for transactions in your own wallet), or getrawtransaction (for all transactions, but only works if you have txindex enabled).
Pieter Wuille
CC BY-SA 4.0
2021-05-03T17:31:40.003Z
`gettransaction` returns that its a non found method for some reason. Yet i have the txindex enabled and set but it won't work for me for some reason. You see that in my parameters to start the node i have `txindex=1`
UnknownHex64
CC BY-SA 4.0
2021-05-03T17:33:21.023Z
As I said, `gettransaction` is only for transactions in your own wallet. If you want to query for other ones, use `getrawtransaction`.
Pieter Wuille
CC BY-SA 4.0
2021-05-03T17:37:01.903Z
But -txindex=1 is legitimate in the start parameters right? Also is that true that i need to have the -reindex parameter to have -txindex=1 fully functional? I read thats what common explorers use
UnknownHex64
CC BY-SA 4.0
2021-05-03T17:41:51.217Z
Since Bitcoin Core v0.17 there is no need to reindex anymore when you enable txindex; the missing part gets rebuilt automatically. Block explorers in general don't use Bitcoin Core (or at least not solely; they use additional software to build an index of blocks/transactions).
Pieter Wuille
CC BY-SA 4.0
2021-05-03T17:44:20.950Z
I see, yes this is for a school project anyways. But so im right that with an older version `-reindex` is needed? Also just to be sure. To use `-txindex=1` is correct in the start parameters and not something like `-txindex 1`
UnknownHex64
CC BY-SA 4.0
2021-05-03T17:46:13.840Z
Yes, that's all correct. Generally you'd put `txindex=1` in your bitcoin.conf file, because you want it to always be enabled. The reindexing is something you want to only do once (so it should not go in bitcoin.conf; if it does, it'll rebuild the entire database from scratch every time you restart Bitcoin Core).
Pieter Wuille
CC BY-SA 4.0
2021-05-03T17:50:35.693Z
Thank you very much. So if reindex is only used once. When is the appropriate time? The first time running the node?
UnknownHex64
CC BY-SA 4.0
2021-05-03T17:52:30.530Z
It's only needed if you previously had a node running without `txindex=1`, and want to enable it. It is needed because (before Bitcoin Core 0.17) it couldn't build the txindex on the fly; you had to start over. If you run with `txindex=1` the first time you run Bitcoin Core, no reindex is needed.
Pieter Wuille
CC BY-SA 4.0
2021-05-03T17:56:28.943Z
Perfect. So i won't need -reindex if i will re-install the node from scratch right. Also do you recommend the `-reindex-chainstate` parameter if the node server ever crashes. Also thank you very much for your information. It's an honour to me to get informations from a bitcoin-core contributor :)
UnknownHex64
CC BY-SA 4.0
2021-05-03T17:04:41.403Z
2021-05-03T17:04:41.403Z
Pieter Wuille
<p><code>litecoin-cli gettxout &quot;9d56b3bf179a988873fc2162d70bba44849ef822764c9049a0f722b5fdc9acc1&quot; 1</code></p>
<p>This is the command im using to get information about a transaction.</p>
<p><code>litecoind -txindex=1 -daemon -conf=/home/litecoin/.litecoin/litecoin.conf -reindex -rpcuser=cryptosensei -rpcpassword=foo_420 -rpcport=9332 -rpcthreads=1000</code></p>
<p>This is the command i use for starting up my daemon. with the <code>-reindex</code> it should not re-verify the blocks. So im wondering why im getting null.</p>
<p>If anyone knows what the issue let me know. Also here is the response of <code>getnetworkinfo</code> &amp; <code>getblockcount</code></p>
<p><strong>getblockcount</strong></p>
<pre><code>litecoin@Debian-913-stretch-64-minimal:/root$ litecoin-cli getblockcount
0
</code></pre>
<p><strong>getblockchaininfo</strong></p>
<pre><code>litecoin@Debian-913-stretch-64-minimal:/root$ litecoin-cli getblockchaininfo
{
  &quot;chain&quot;: &quot;main&quot;,
  &quot;blocks&quot;: 0,
  &quot;headers&quot;: 526188,
  &quot;bestblockhash&quot;: &quot;12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2&quot;,
  &quot;difficulty&quot;: 0.000244140625,
  &quot;mediantime&quot;: 1317972665,
  &quot;verificationprogress&quot;: 1.737314343731834e-08,
  &quot;initialblockdownload&quot;: true,
  &quot;chainwork&quot;: &quot;0000000000000000000000000000000000000000000000000000000000100010&quot;,
  &quot;size_on_disk&quot;: 2217395400,
  &quot;pruned&quot;: false,
  &quot;softforks&quot;: [
    {
      &quot;id&quot;: &quot;bip34&quot;,
      &quot;version&quot;: 2,
      &quot;reject&quot;: {
        &quot;status&quot;: false
      }
    },
    {
      &quot;id&quot;: &quot;bip66&quot;,
      &quot;version&quot;: 3,
      &quot;reject&quot;: {
        &quot;status&quot;: false
      }
    },
    {
      &quot;id&quot;: &quot;bip65&quot;,
      &quot;version&quot;: 4,
      &quot;reject&quot;: {
        &quot;status&quot;: false
      }
    }
  ],
  &quot;bip9_softforks&quot;: {
    &quot;csv&quot;: {
      &quot;status&quot;: &quot;defined&quot;,
      &quot;startTime&quot;: 1485561600,
      &quot;timeout&quot;: 1517356801,
      &quot;since&quot;: 0
    },
    &quot;segwit&quot;: {
      &quot;status&quot;: &quot;defined&quot;,
      &quot;startTime&quot;: 1485561600,
      &quot;timeout&quot;: 1517356801,
      &quot;since&quot;: 0
    }
  },
  &quot;warnings&quot;: &quot;&quot;
}
</code></pre>

<litecoin><full-node><nodes>
no output on gettxout method [All Blocks Are Counted]
UnknownHex64
# no output on gettxout method [All Blocks Are Counted]

(Asked by: username_0 on 2021-05-03)

`litecoin-cli gettxout "9d56b3bf179a988873fc2162d70bba44849ef822764c9049a0f722b5fdc9acc1" 1`

This is the command im using to get information about a transaction.

`litecoind -txindex=1 -daemon -conf=/home/litecoin/.litecoin/litecoin.conf -reindex -rpcuser=cryptosensei -rpcpassword=foo_420 -rpcport=9332 -rpcthreads=1000`

This is the command i use for starting up my daemon. with the `-reindex` it should not re-verify the blocks. So im wondering why im getting null.

If anyone knows what the issue let me know. Also here is the response of `getnetworkinfo` & `getblockcount`

**getblockcount**

```
litecoin@Debian-913-stretch-64-minimal:/root$ litecoin-cli getblockcount
0

```

**getblockchaininfo**

```
litecoin@Debian-913-stretch-64-minimal:/root$ litecoin-cli getblockchaininfo
{
  "chain": "main",
  "blocks": 0,
  "headers": 526188,
  "bestblockhash": "12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2",
  "difficulty": 0.000244140625,
  "mediantime": 1317972665,
  "verificationprogress": 1.737314343731834e-08,
  "initialblockdownload": true,
  "chainwork": "0000000000000000000000000000000000000000000000000000000000100010",
  "size_on_disk": 2217395400,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": false
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "defined",
      "startTime": 1485561600,
      "timeout": 1517356801,
      "since": 0
    },
    "segwit": {
      "status": "defined",
      "startTime": 1485561600,
      "timeout": 1517356801,
      "since": 0
    }
  },
  "warnings": ""
}

```

**Tags:** litecoin, full-node, nodes


---

## 1 answers

### Answer by username_1 on 2021-05-03. Score: 1

Assuming this is identical to Bitcoin Core.

This is somewhat confusing, but it simply means that UTXO is spent. It is reporting "nothing" as output.

> **Comments:**
> **username_0**: Yep very confusing. Also yes it is completly identical to bitcoin core actually. What im asking myself is what the exact difference between `-reindex` & `-reindex-chainstate` is. Maybe this is the cause of all of that  
> **username_1**: -reindex scans all block data again; -reindex-chainstate assumes your blocks are fine. It sounds unrelated to your question - there is nothing wrong here. The output you're asking about simply has been spent already.  
> **username_0**: Ahh okay. So what method is the correct one to simply check a transaction? [Confirmations etc]  
> **username_1**: gettransaction (only works for transactions in your own wallet), or getrawtransaction (for all transactions, but only works if you have txindex enabled).  
> **username_0**: `gettransaction` returns that its a non found method for some reason. Yet i have the txindex enabled and set but it won't work for me for some reason. You see that in my parameters to start the node i have `txindex=1`  
> **username_1**: As I said, `gettransaction` is only for transactions in your own wallet. If you want to query for other ones, use `getrawtransaction`.  
> **username_0**: But -txindex=1 is legitimate in the start parameters right? Also is that true that i need to have the -reindex parameter to have -txindex=1 fully functional? I read thats what common explorers use  
> **username_1**: Since Bitcoin Core v0.17 there is no need to reindex anymore when you enable txindex; the missing part gets rebuilt automatically. Block explorers in general don't use Bitcoin Core (or at least not solely; they use additional software to build an index of blocks/transactions).  
> **username_0**: I see, yes this is for a school project anyways. But so im right that with an older version `-reindex` is needed? Also just to be sure. To use `-txindex=1` is correct in the start parameters and not something like `-txindex 1`  
> **username_1**: Yes, that's all correct. Generally you'd put `txindex=1` in your bitcoin.conf file, because you want it to always be enabled. The reindexing is something you want to only do once (so it should not go in bitcoin.conf; if it does, it'll rebuild the entire database from scratch every time you restart Bitcoin Core).  
> **username_0**: Thank you very much. So if reindex is only used once. When is the appropriate time? The first time running the node?  
> **username_1**: It's only needed if you previously had a node running without `txindex=1`, and want to enable it. It is needed because (before Bitcoin Core 0.17) it couldn't build the txindex on the fly; you had to start over. If you run with `txindex=1` the first time you run Bitcoin Core, no reindex is needed.  
> **username_0**: Perfect. So i won't need -reindex if i will re-install the node from scratch right. Also do you recommend the `-reindex-chainstate` parameter if the node server ever crashes. Also thank you very much for your information. It's an honour to me to get informations from a bitcoin-core contributor :)  

---

