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

IDEA: speed up scanning #78

Open
bulhiCzar opened this issue Dec 7, 2024 · 2 comments
Open

IDEA: speed up scanning #78

bulhiCzar opened this issue Dec 7, 2024 · 2 comments

Comments

@bulhiCzar
Copy link

bulhiCzar commented Dec 7, 2024

https://github.com/vsys-host/tron-shkeeper/blob/a1644880eede28f72c4d23bdc8d9ea606069feea/app/tasks.py#L167

Reading the code. I noticed that this code takes the old addresses first and moves through them. what about my cases (40K+ addresses) is a very long time. and I have to wait a long time for it to reach the current addresses.
I suggest sorting DESC by creation date in order to take fresh addresses first

my problem. payment to me while my network was out of sync. After synchronization, I received a payment webhook. but usdt remained on the disposable wallet (more than 24 hours have passed). and I think what could be the problem is that strange addresses appeared first, not new ones

upd: I had to wait more than 2 days for my recent addresses to start being viewed. and money is debited from them to the current balance

@dmytro-samoylenko
Copy link
Member

Hello,

Thank you for suggestion.

The Funds from one time to main account are moved at the time a new incoming transaction has been discovered https://github.com/vsys-host/tron-shkeeper/blob/a1644880eede28f72c4d23bdc8d9ea606069feea/app/block_scanner.py#L162 The task you referred to is used as a backup means to transfer from one time to main account, if for some reason the transfer at transaction discovery time failed. It isn't hard to change sorting, but I suggest you to check logs to see why the funds are not moved immediately once the transaction is discovered and webhook has been sent. The one reason of I can think of is that you don't have enough TRX on the main account.

@bulhiCzar
Copy link
Author

There was enough TRX in the account. but at that time, the network was synchronizing 8000 blocks behind. and as it was noted to me, during the synchronization, while fullnode was online, the amount came to the wallet. that was during the Sichronization. The debit to the main account will be skipped. and it will be executed only during backup screening.

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

2 participants