bitcoin-abc icon indicating copy to clipboard operation
bitcoin-abc copied to clipboard

listsinceblock reports wrong amount if tx has multiple vouts with same address

Open cemkod opened this issue 7 years ago • 2 comments

Describe the issue

TXID 459b264d38ad96295b91d8744d6f52079dbdad3b72f183bf58e3fe8fc52c47b5 has multiple vouts for the same address qqmlpuexkg42n2nfkpjt3ljn6fs9f3vk95ng0vpnhw

listsinceblock RPC and command both report only one of these vouts.

Can you reliably reproduce the issue?

Yes.

If so, please list the steps to reproduce below:

You can check given txid by adding a watchonly address or generate another test transaction with multiple vouts having same address.

Expected behaviour

I expect listsinceblock RPC and command to either show multiple records for multiple vouts or a single record with the sum of amounts.

    {
      "account": "",
      "address": "bitcoincash:qqmlpuexkg42n2nfkpjt3ljn6fs9f3vk95ng0vpnhw",
      "category": "receive",
      "amount": 20.00000000,
      "label": "",
      "vout": 2,
      "confirmations": 4358,
      "blockhash": "0000000000000000003e3ab5fc73db0564dac91a850cda76ac1e84e23c17e6d9",
      "blockindex": 5,
      "blocktime": 1522763226,
      "txid": "459b264d38ad96295b91d8744d6f52079dbdad3b72f183bf58e3fe8fc52c47b5",
      "walletconflicts": [
      ],
      "time": 1522763002,
      "timereceived": 1522763002
    },
    {
      "account": "",
      "address": "bitcoincash:qqmlpuexkg42n2nfkpjt3ljn6fs9f3vk95ng0vpnhw",
      "category": "receive",
      "amount": 10.00000000,
      "label": "",
      "vout": 5,
      "confirmations": 4358,
      "blockhash": "0000000000000000003e3ab5fc73db0564dac91a850cda76ac1e84e23c17e6d9",
      "blockindex": 5,
      "blocktime": 1522763226,
      "txid": "459b264d38ad96295b91d8744d6f52079dbdad3b72f183bf58e3fe8fc52c47b5",
      "walletconflicts": [
      ],
      "time": 1522763002,
      "timereceived": 1522763002
    }

Actual behaviour

listsinceblock RPC and command both report only one of these vouts.

    {
      "account": "",
      "address": "bitcoincash:qqmlpuexkg42n2nfkpjt3ljn6fs9f3vk95ng0vpnhw",
      "category": "receive",
      "amount": 20.00000000,
      "label": "",
      "vout": 2,
      "confirmations": 4358,
      "blockhash": "0000000000000000003e3ab5fc73db0564dac91a850cda76ac1e84e23c17e6d9",
      "blockindex": 5,
      "blocktime": 1522763226,
      "txid": "459b264d38ad96295b91d8744d6f52079dbdad3b72f183bf58e3fe8fc52c47b5",
      "walletconflicts": [
      ],
      "time": 1522763002,
      "timereceived": 1522763002
    }

What version of bitcoin-abc are you using?

Official Binary "version": 170000, "protocolversion": 70015, "walletversion": 130000,

cemkod avatar May 03 '18 14:05 cemkod

Confirming this and will work on a fix.

jmprcx avatar May 04 '18 20:05 jmprcx

Has this problem been solved?

bogerv avatar May 23 '19 13:05 bogerv