gettransaction blockindex does not return height of block that includes transaction #7532

issue pinheadmz openend this issue on February 13, 2016
  1. pinheadmz commented at 9:27 pm on February 13, 2016: member

    This transaction definitely did not get confirmed in block 634!

    Is the documentation incorrect?

    https://bitcoin.org/en/developer-reference#gettransaction

    or…

    https://github.com/bitcoin/bitcoin/blob/62f2d769e45043c1f262ed45babb70fe237ad2bb/src/wallet/rpcwallet.cpp#L1724

    …or I am seriously misunderstanding the object returned by this RPC call?

     0$ gettransaction ef27b4d74497780096b466164e90ac12b1b7bd695246d4b1b232195ed168782e
     1
     2  {
     3    "account": "",
     4    "address": "1DjDpiQaWtTeK4vLFqUH9G3ZkQF2oaxmap",
     5    "category": "receive",
     6    "amount": 0.00258000,
     7    "label": "",
     8    "vout": 0,
     9    "confirmations": 7,
    10    "blockhash": "000000000000000000ca6aa53efc2b89b82eca3e2dfcd942951e2b3fdfae6e67",
    11    "blockindex": 634,
    12    "blocktime": 1455395504,
    13    "txid": "ef27b4d74497780096b466164e90ac12b1b7bd695246d4b1b232195ed168782e",
    14    "walletconflicts": [
    15    ],
    16    "time": 1455394848,
    17    "timereceived": 1455394848,
    18    "bip125-replaceable": "no"
    19  }
    
  2. sipa commented at 9:28 pm on February 13, 2016: member
    It’s the position of the transaction in the block. To know the height at which it confirmed, look at the confirmations.
  3. pinheadmz commented at 9:41 pm on February 13, 2016: member
    Ok. Developer guide is wrong and bitcoind help is a little confusing. Maybe I’ll make a few little PRs
  4. laanwj commented at 12:39 pm on February 15, 2016: member
    Seems to work as intended, closing
  5. laanwj closed this on Feb 15, 2016

  6. laanwj added the label Docs and Output on Feb 15, 2016
  7. instagibbs referenced this in commit e53cf2210b on Feb 25, 2016
  8. GamerSg referenced this in commit 21c77a5d13 on Feb 27, 2016
  9. MarcoFalke referenced this in commit 23bb798d14 on Apr 25, 2016
  10. MarcoFalke referenced this in commit 52c101158f on Apr 27, 2016
  11. thokon00 referenced this in commit 74cebf6e2e on Jun 28, 2016
  12. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me