Conversation
Could this be replaced by some form of |
that makes sense, changed it to |
c739ac1 to
0cfd3d2
Compare
fd5401c to
27c214c
Compare
Codecov Report
... and 30 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
mattsse
left a comment
There was a problem hiding this comment.
I like this feature,
impl is well documented.
bin/reth/src/db/diff.rs
Outdated
| } | ||
|
|
||
| impl Command { | ||
| /// Execute `db diff` command |
There was a problem hiding this comment.
I'd like some docs about what diff exactly does behind the scenes
There was a problem hiding this comment.
just added a comment that is hopefully sufficient
| } | ||
|
|
||
| /// Find diffs for a table, then analyzing the result | ||
| fn find_diffs<'a, T: Table>( |
There was a problem hiding this comment.
we call this a lot with all tables, which likely generates a lot of code due to how big the functions is.
we make it less generic over T, but we still new value etc.
so probably not worth the effort imo
There was a problem hiding this comment.
yeah, because cursor_read is generic over T, I'm not sure this can be simplified much further, even in code size, especially since we want to do this for every possible table
This adds a command,
reth db diff, which is able to diff two reth databases, either a full DB diff or table-by-table.Command line output example:
Example of extra-element output (no discrepancies but a table has an extra element):
And discrepancy output: