Is listtransactions correct? #22608

issue var-llc opened this issue on August 2, 2021
  1. var-llc commented at 4:40 PM on August 2, 2021: none
    ubuntu:~/environment $ bitcoin-cli -datadir=btcdir -testnet -rpcwallet=tomo2 listtransactions "*" 
    [
      {
        "address": "tb1qdvx8rmj8e94a43lsj5jq4ja6hu2efgps50s0kk",
        "category": "receive",
        "amount": 0.00010000,
        "label": "user1",
        "vout": 0,
        "confirmations": 12,
        "blockhash": "000000000ea24c66faac775cca0a1963a183d03bd4f37cc9890f166d9a75fe90",
        "blockheight": 2062825,
        "blockindex": 91,
        "blocktime": 1627916153,
        "txid": "9786cbc553d528be721a34502cfb8322ab5f269633aaab9cdc8f8df1e35f732d",
        "walletconflicts": [
        ],
        "time": 1627915291,
        "timereceived": 1627915291,
        "bip125-replaceable": "no"
      },
      {
        "address": "tb1qdcvdnq46qxk7yxzmvwmscnzalpltaxt7k74nle",
        "category": "receive",
        "amount": 0.00010000,
        "label": "user2",
        "vout": 1,
        "confirmations": 12,
        "blockhash": "000000000ea24c66faac775cca0a1963a183d03bd4f37cc9890f166d9a75fe90",
        "blockheight": 2062825,
        "blockindex": 113,
        "blocktime": 1627916153,
        "txid": "01eff63265abbcc5647b1f06402aa50fb4be5f6c1d2f4128a3bdb637c6535e7d",
        "walletconflicts": [
        ],
        "time": 1627915300,
        "timereceived": 1627915300,
        "bip125-replaceable": "no"
      },
      {
        "address": "tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
        "category": "send",
        "amount": -0.00010000,
        "vout": 1,
        "fee": -0.00000208,
        "confirmations": 9,
        "blockhash": "00000000ff6e1692ed86533b03d527a183e44ad3382b429075466515582a3a6a",
        "blockheight": 2062828,
        "blockindex": 102,
        "blocktime": 1627918629,
        "txid": "e08d12afb8aebe4571a293acaa7e0b84d0baccafb1d242cb0fc1d936f65d29f0",
        "walletconflicts": [
        ],
        "time": 1627917768,
        "timereceived": 1627917768,
        "bip125-replaceable": "no",
        "abandoned": false
      },
      {
        "address": "tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
        "category": "send",
        "amount": -0.00005000,
        "vout": 0,
        "fee": -0.00000141,
        "confirmations": 9,
        "blockhash": "00000000ff6e1692ed86533b03d527a183e44ad3382b429075466515582a3a6a",
        "blockheight": 2062828,
        "blockindex": 103,
        "blocktime": 1627918629,
        "txid": "6e0c2ace9900b668c9b633e7045a9c0895bb9754c6f41c70cfde628bb3562d6a",
        "walletconflicts": [
        ],
        "time": 1627918027,
        "timereceived": 1627918027,
        "bip125-replaceable": "no",
        "abandoned": false
      },
      {
        "address": "tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
        "category": "send",
        "amount": -0.00001000,
        "vout": 1,
        "fee": -0.00000141,
        "confirmations": 3,
        "blockhash": "000000000000002f727825f1de5b724f33a4b4aca5ab16c9bfafb508824afa4e",
        "blockheight": 2062834,
        "blockindex": 25,
        "blocktime": 1627920653,
        "txid": "1e674af169748c15d5017b22a93e6e524e039e409c5f2b714d146a31ba61fcc7",
        "walletconflicts": [
        ],
        "time": 1627920400,
        "timereceived": 1627920400,
        "bip125-replaceable": "no",
        "comment": "cooment=move",
        "abandoned": false
      },
      {
        "address": "tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
        "category": "send",
        "amount": -0.00001000,
        "vout": 0,
        "fee": -0.00000141,
        "confirmations": 2,
        "blockhash": "000000000000001f09fea29302386f747e2ad871dad1707396aed27823566d42",
        "blockheight": 2062835,
        "blockindex": 78,
        "blocktime": 1627920941,
        "txid": "22e365f45981c8550484be576ac8c9aa62400d9320873be057ed20404cae7f5c",
        "walletconflicts": [
        ],
        "time": 1627920839,
        "timereceived": 1627920839,
        "bip125-replaceable": "no",
        "comment": "cooment_to=move",
        "abandoned": false
      }
    ]
    ubuntu:~/environment $ bitcoin-cli -datadir=btcdir -testnet -rpcwallet=tomo2 listtransactions "*" 3 3
    [
      {
        "address": "tb1qdvx8rmj8e94a43lsj5jq4ja6hu2efgps50s0kk",
        "category": "receive",
        "amount": 0.00010000,
        "label": "user1",
        "vout": 0,
        "confirmations": 12,
        "blockhash": "000000000ea24c66faac775cca0a1963a183d03bd4f37cc9890f166d9a75fe90",
        "blockheight": 2062825,
        "blockindex": 91,
        "blocktime": 1627916153,
        "txid": "9786cbc553d528be721a34502cfb8322ab5f269633aaab9cdc8f8df1e35f732d",
        "walletconflicts": [
        ],
        "time": 1627915291,
        "timereceived": 1627915291,
        "bip125-replaceable": "no"
      },
      {
        "address": "tb1qdcvdnq46qxk7yxzmvwmscnzalpltaxt7k74nle",
        "category": "receive",
        "amount": 0.00010000,
        "label": "user2",
        "vout": 1,
        "confirmations": 12,
        "blockhash": "000000000ea24c66faac775cca0a1963a183d03bd4f37cc9890f166d9a75fe90",
        "blockheight": 2062825,
        "blockindex": 113,
        "blocktime": 1627916153,
        "txid": "01eff63265abbcc5647b1f06402aa50fb4be5f6c1d2f4128a3bdb637c6535e7d",
        "walletconflicts": [
        ],
        "time": 1627915300,
        "timereceived": 1627915300,
        "bip125-replaceable": "no"
      },
      {
        "address": "tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
        "category": "send",
        "amount": -0.00010000,
        "vout": 1,
        "fee": -0.00000208,
        "confirmations": 9,
        "blockhash": "00000000ff6e1692ed86533b03d527a183e44ad3382b429075466515582a3a6a",
        "blockheight": 2062828,
        "blockindex": 102,
        "blocktime": 1627918629,
        "txid": "e08d12afb8aebe4571a293acaa7e0b84d0baccafb1d242cb0fc1d936f65d29f0",
        "walletconflicts": [
        ],
        "time": 1627917768,
        "timereceived": 1627917768,
        "bip125-replaceable": "no",
        "abandoned": false
      }
    ]
    
    I want to skip 3 past transactions.
    
    However, it seems that the three latest transactions have been eliminated.
    
    Is this the correct behavior?
    
    
    ideal
    > bitcoin-cli listtransactions "*" 20 100
    List transactions 100 to 120
    
    realty
    > bitcoin-cli listtransactions "*" 20 100
    List transactions 0 to 20
    
    
    2021-08-02T13:23:29Z Bitcoin Core version v0.21.1 (release build)
    
  2. var-llc added the label Bug on Aug 2, 2021
  3. ghost commented at 6:14 PM on August 2, 2021: none

    I want to skip 3 past transactions. However, it seems that the three latest transactions have been eliminated.

    Consider there are 10 transactions in wallet: Tx<sub>1</sub> to Tx<sub>10</sub>. Latest is Tx<sub>10</sub>.

    If I want to skip Tx<sub>1</sub>, Tx<sub>2</sub> and Tx<sub>3</sub>, I will use the below steps:

    1. Check total transactions in getwalletinfo

    2. listtransactions [LABEL] [COUNT] [SKIP]

      LABEL = * SKIP = 0 NUM = 3 (Number of transactions I want to skip) COUNT = TOTAL - NUM = 10 - 3 = 7

      listtransactions "*" 7 0
      

      https://bitcoin.stackexchange.com/a/106127/

  4. var-llc commented at 3:56 AM on August 3, 2021: none

    thank you , very easy to understand

    It wasn't a documentation mistake, it was my misinterpretation.

  5. MarcoFalke commented at 7:20 AM on August 3, 2021: member

    It wasn't a documentation mistake, it was my misinterpretation.

    Ok, closing for now. Let us know if you have any other questions.

  6. MarcoFalke closed this on Aug 3, 2021

  7. MarcoFalke added the label Questions and Help on Aug 3, 2021
  8. MarcoFalke removed the label Bug on Aug 3, 2021
  9. DrahtBot locked this on Aug 18, 2022

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: 2026-04-22 15:14 UTC

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