-
Notifications
You must be signed in to change notification settings - Fork 1.7k
bring snapshotting work into master #1577
Conversation
some tests would be nice... |
@gavofyork +1 |
} | ||
|
||
// write block values. | ||
stream.append(&block_view.transactions()).append(&block_view.uncles()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be more optimal to append rlps directly, without converting to transaction/header structure. transactions_rlp
and uncles_rlp
can be added to BlockView
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we skip a couple of the fields from the header, i think we have to at least decode that.
block chunking is significantly faster than state chunking even so
let compressed = &compression_buffer[..compressed_size]; | ||
let hash = compressed.sha3(); | ||
|
||
assert!(snappy::validate_compressed_buffer(compressed)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can the error be returned instead of panic happening with the assert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this assert should be removed outright actually. i added it while debugging but it will only fail if snappy has a bug
I added account and block tests. I will add tests for the overall snapshotting mechanism once I implement snapshot restoration. Right now there isn't anything I can see to meaningfully test in that module. |
No description provided.