Skip to content

[Bug] wallet update states and subscribes to a HUGE number of already spent coins on restart #17013

Open
@iliasorazov

Description

@iliasorazov

What happened?

The wallet is very active but only has 2-6 unspent coins now.

The restart takes ~20 minutes and there are following lines in the log:

INFO Successfully subscribed and updated 852 puzzle hashes
INFO new coin state received (1-900/ 1000)
INFO new coin state received (901-1000/ 1000)
<skipped 226 lines>
INFO new coin state received (1-900/ 1000)
INFO new coin state received (901-1000/ 1000)
INFO new coin state received (1-556/ 556)
INFO Successfully subscribed and updated 115556 coin ids

It seams that coins comes from the interested_coins table which has 115556 records now and there is only one place in the code where these coins are removed:

if record.coin_type == CoinType.CLAWBACK:
await self.interested_store.remove_interested_coin_id(coin_state.coin.name())

But what about normal coins? What about rewards? Why the wallet is interested in already spent coins and takes forever to restart? This doesn't seems right.

Any suggestions?

Version

2.1.1

What platform are you using?

Linux

What ui mode are you using?

CLI

Relevant log output

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions