-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Naive light client synchronization #3892
Conversation
ethcore/res/ethereum/tests needs reverting |
Changes Unknown when pulling d0194f3 on lightsync into ** on master**. |
Changes Unknown when pulling 0688ccb on lightsync into ** on master**. |
if number == 1 { | ||
let g_view = HeaderView::new(&self.genesis_header); | ||
g_view.difficulty() | ||
} else { |
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.
else {
try!(candidates.get(&(number - 1))
.and_then(|entry| entry.candidates.iter().find(|c| c.hash == parent_hash))
.map(|c| c.total_difficulty)
.ok_or(BlockError::UnknownParent(parent_hash)))
}
?
pub fn genesis_hash(&self) -> H256 { | ||
use util::Hashable; | ||
|
||
self.genesis_header.sha3() |
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.
one-liner
::util::Hashable::sha3(&self.genesis_header)
?
Changes Unknown when pulling 55dbfbf on lightsync into ** on master**. |
Given that 1.5 has been delayed a bit, it might make sense to remove the CLI option for now and merge this into master afterwards. I have a few pending PRs which build upon it but I haven't made yet in anticipation of the merge. |
(CLI removed) |
This work was getting pretty massive so I've decided to cut it off here for now and leave further improvements/tests to future PRs.
Please review but don't merge until 1.5 is released.