Implement get_block_roots for syncing

This commit is contained in:
Paul Hauner
2019-03-22 14:20:49 +11:00
parent f96a3282b5
commit 96ba1c8f77
5 changed files with 146 additions and 20 deletions

View File

@@ -139,8 +139,19 @@ impl MessageHandler {
self.sync
.on_hello(peer_id, hello_message, &mut self.network_context);
}
RPCResponse::BeaconBlockRoots(response) => {
debug!(
self.log,
"BeaconBlockRoots response received from peer: {:?}", peer_id
);
self.sync.on_beacon_block_roots_response(
peer_id,
response,
&mut self.network_context,
)
}
// TODO: Handle all responses
_ => {}
_ => panic!("Unknown response: {:?}", response),
}
}
}