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

Remove index from CountBase #4

Open
passabilities opened this issue Jul 22, 2020 · 3 comments
Open

Remove index from CountBase #4

passabilities opened this issue Jul 22, 2020 · 3 comments

Comments

@passabilities
Copy link
Contributor

When I need to remove an element from an array fetched from CountBase there is no clear way to do this. I'm able to set an element to null in the array and then shift elements to the correct index but the config for a CountBase is setup to only increment the length of a bucket as seen here

@bruscantini won't let me assign you to the issue for some reason

@paullinator
Copy link
Member

You are correct and the specification for countbase does not allow deletion of elements. Doing so would incur a large performance hit. What is the condition where you would need to delete an element?

@passabilities
Copy link
Contributor Author

Removing a UTXO

@paullinator
Copy link
Member

paullinator commented Jul 23, 2020

@passabilities Those should go in a rangebase not a countbase. Although admittedly we do not have a way of removing an item from the rangebase but we should add it

@bruscantini would you be open to adding a remove() method to rangebase?

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