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

Create index for sorted activity #999

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Create index for sorted activity #999

merged 2 commits into from
Mar 21, 2024

Conversation

benthecarman
Copy link
Collaborator

Now keeps a sorted index of our activity at all time. This should make our activity much faster with only a slight overhead increase.

@benthecarman benthecarman added the enhancement New feature or request label Jan 30, 2024
@benthecarman benthecarman force-pushed the activity-index branch 4 times, most recently from 75dc19c to 3548c9f Compare February 1, 2024 22:31
@benthecarman
Copy link
Collaborator Author

Changed to limit/offset instead of start/until as we talked irl

Copy link
Contributor

@TonyGiorgio TonyGiorgio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-02-02 at 11 43 42 AM

An unknown 0 sat on chain payment appeared during some channel closes.

Screenshot 2024-02-02 at 11 47 15 AM

Multiple force close items are showing up when I only had one.

Further, I cannot test this long enough without getting OOM issues.

mutiny-core/src/lib.rs Show resolved Hide resolved
mutiny-core/src/lib.rs Outdated Show resolved Hide resolved
@TonyGiorgio
Copy link
Contributor

Screenshot 2024-02-02 at 11 50 40 AM

This lightning payment is showing up between the older on chain force closes that are duplicated

@benthecarman
Copy link
Collaborator Author

Fixed all the duplication errors which also seemed to fixed the crashing for me too, curious if it helps for you as well.

@benthecarman benthecarman linked an issue Feb 5, 2024 that may be closed by this pull request
@TonyGiorgio
Copy link
Contributor

What if we did this and defaulted the activity list to the last ~30 items?

My phone is starting to get very slow. And having the new social home screen basically being a "view all" for the transaction list, I would rather it not be that much.

@benthecarman
Copy link
Collaborator Author

Makes sense to me, can rebase

@benthecarman benthecarman force-pushed the activity-index branch 3 times, most recently from 1ee255a to 20dce22 Compare March 21, 2024 04:58
Copy link
Contributor

@TonyGiorgio TonyGiorgio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. If you just want to test it to make sure it works with the new mutiny social PR, that would be great.

@benthecarman
Copy link
Collaborator Author

Found a potential index out of bounds error when testing, fixed it and added tests. Otherwise everything else felt good

@benthecarman
Copy link
Collaborator Author

sorry last push, chatgpt told me another check to add just in case:

// handle start > end
if start > end {
	return vec![];
}

@benthecarman benthecarman merged commit caf1175 into master Mar 21, 2024
9 checks passed
@benthecarman benthecarman deleted the activity-index branch March 21, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Paginate activity
2 participants