Skip to content

Refactor of Hyperbee._rollback()#22

Open
caolan wants to merge 2 commits into
holepunchto:mainfrom
caolan:rollback-refactor
Open

Refactor of Hyperbee._rollback()#22
caolan wants to merge 2 commits into
holepunchto:mainfrom
caolan:rollback-refactor

Conversation

@caolan

@caolan caolan commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

For discussion.

There were numerous comparisons of expected === this.unbatch which were unnecessary. Reduced number of variables by tracking only seq and not length.

TODO: Before merging, review whether attempting to rollback more write batches than exist in the core should be an error case.

There were numerous comparisons of `expected === this.unbatch` which
were unnecessary. Reduced number of variables by tracking only `seq`
and not `length`.

TODO: review whether attempting to rollback more write batches than
exist in the core should be an error case.
@mafintosh

Copy link
Copy Markdown
Contributor

thanks @caolan i think it looks great

@mafintosh

Copy link
Copy Markdown
Contributor

re your q, i dont think it needs to be an error case, we can be forgiving here for now

@mafintosh

Copy link
Copy Markdown
Contributor

can you update comments?

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

Successfully merging this pull request may close these issues.

2 participants