Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listaccounthistory "mine" duplicate results until limit is reached #1592

Open
skutcher opened this issue Nov 22, 2022 · 1 comment
Open

listaccounthistory "mine" duplicate results until limit is reached #1592

skutcher opened this issue Nov 22, 2022 · 1 comment

Comments

@skutcher
Copy link

What happened:

I have a wallet with two addresses, when i trigger both listaccounthistory data's standalone everything works as expected. But as soon as i directly use "mine" as address it fills up the limit parameter with duplicates of the result

listaccounthistory "mine" {"maxBlockHeight":2435105,"depth":1,"no_rewards":false,"limit":25,"format":"id"}
[
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "4",
    "amounts": [
      "0.00001880@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "5",
    "amounts": [
      "0.00004101@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "17",
    "amounts": [
      "0.00000134@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "101",
    "amounts": [
      "0.00006525@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "102",
    "amounts": [
      "0.00000187@0"
    ]
  },
  {
    "owner": "YYY",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "4",
    "amounts": [
      "0.00000007@0"
    ]
  },
  {
    "owner": "YYY",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "101",
    "amounts": [
      "0.00000269@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "4",
    "amounts": [
      "0.00001880@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "5",
    "amounts": [
      "0.00004101@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "17",
    "amounts": [
      "0.00000134@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "101",
    "amounts": [
      "0.00006525@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "102",
    "amounts": [
      "0.00000187@0"
    ]
  },
  {
    "owner": "YYY",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "4",
    "amounts": [
      "0.00000007@0"
    ]
  },
  {
    "owner": "YYY",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "101",
    "amounts": [
      "0.00000269@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "4",
    "amounts": [
      "0.00001880@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "5",
    "amounts": [
      "0.00004101@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "17",
    "amounts": [
      "0.00000134@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "101",
    "amounts": [
      "0.00006525@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "102",
    "amounts": [
      "0.00000187@0"
    ]
  },
  {
    "owner": "YYY",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "4",
    "amounts": [
      "0.00000007@0"
    ]
  },
  {
    "owner": "YYY",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "101",
    "amounts": [
      "0.00000269@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "4",
    "amounts": [
      "0.00001880@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "5",
    "amounts": [
      "0.00004101@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "17",
    "amounts": [
      "0.00000134@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "101",
    "amounts": [
      "0.00006525@0"
    ]
  }
]
listaccounthistory "YYY" {"maxBlockHeight":2435105,"depth":1,"no_rewards":false,"limit":250,"format":"id"}
[
  {
    "owner": "YYY",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "4",
    "amounts": [
      "0.00000007@0"
    ]
  },
  {
    "owner": "YYY",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "101",
    "amounts": [
      "0.00000269@0"
    ]
  }
]
listaccounthistory "XXX" {"maxBlockHeight":2435105,"depth":1,"no_rewards":false,"limit":250,"format":"id"}
[
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "4",
    "amounts": [
      "0.00001880@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "5",
    "amounts": [
      "0.00004101@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "17",
    "amounts": [
      "0.00000134@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "101",
    "amounts": [
      "0.00006525@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "102",
    "amounts": [
      "0.00000187@0"
    ]
  }
]

What you expected to happen:

Same result as cutting both single address results together

listaccounthistory "mine" {"maxBlockHeight":2435105,"depth":1,"no_rewards":false,"limit":25,"format":"id"}
[
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "4",
    "amounts": [
      "0.00001880@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "5",
    "amounts": [
      "0.00004101@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "17",
    "amounts": [
      "0.00000134@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "101",
    "amounts": [
      "0.00006525@0"
    ]
  },
  {
    "owner": "XXX",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "102",
    "amounts": [
      "0.00000187@0"
    ]
  },
  {
    "owner": "YYY",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "Coinbase",
    "poolID": "4",
    "amounts": [
      "0.00000007@0"
    ]
  },
  {
    "owner": "YYY",
    "blockHeight": 2435104,
    "blockHash": "3fac68961122358f412a2095a5cf5d9dbea7bd68991817273fd1deef9c92e0a3",
    "blockTime": 1669159348,
    "type": "Rewards",
    "rewardType": "LoanTokenDEXReward",
    "poolID": "101",
    "amounts": [
      "0.00000269@0"
    ]
  }
]

How to reproduce it (as minimally and precisely as possible):

so above

What are your environment parameters:

Linux 6.0.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 16 Nov 2022 17:01:17 +0000 x86_64 GNU/Linux
ain v2.11.1

Anything else we need to know?:

The command using "mine" take more than 3 times as long to execute

@defichain-bot
Copy link
Member

@skutcher: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details

I am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the DeFiCh/oss-governance-bot repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants