-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
let again_raw = UntrustedRlp::new(&compact_vec).decompress(RlpType::Snapshot); | ||
assert_eq!(raw, again_raw.to_vec()); | ||
} | ||
|
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.
replace spaces with tabs
// Shortest decompressed account is 70, so simply try to swap the value. | ||
Ok(ref p) if p.value_len < 70 => simple_swap(), | ||
_ => { | ||
if let Ok(d) = rlp.data() { |
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.
line 109
already proves that rlp is data. You can use expect(...)
here or replace line 109 with:
if let Ok(d) = rlp.data() {
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.
*edit, my previous comment may not be valid. is_data
does not check validity of data, whereas rlp.data()
does. Is rlp
expected to be invalid here?
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 can be invalid, since data field is not always an RLP.
overall LGTM |
i guess it's not yet optional? |
Ah ok, will make it optional for |
ok looks good. actually results in a ~ 8% speedup for the first 200k blocks. |
I got some speedup on full sync too.
With blocks compression:
|
Conflicts: ethcore/src/blockchain/blockchain.rs
Compressible
interfaceblocks
DB compression on syncing