mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Switch to new light client protocol (#5472)
* Switch to the new protocol * Oops, forgot to remove light_dispatch.rs * Fix tests * Address review
This commit is contained in:
@@ -133,7 +133,6 @@ impl<B: BlockT, H: ExHashT> Behaviour<B, H> {
|
||||
}
|
||||
|
||||
/// Issue a light client request.
|
||||
#[allow(unused)]
|
||||
pub fn light_client_request(&mut self, r: light_client_handler::Request<B>) -> Result<(), light_client_handler::Error> {
|
||||
self.light_client_handler.request(r)
|
||||
}
|
||||
@@ -175,6 +174,9 @@ Behaviour<B, H> {
|
||||
let ev = Event::NotificationsReceived { remote, messages };
|
||||
self.events.push(BehaviourOut::Event(ev));
|
||||
},
|
||||
CustomMessageOutcome::PeerNewBest(peer_id, number) => {
|
||||
self.light_client_handler.update_best_block(&peer_id, number);
|
||||
}
|
||||
CustomMessageOutcome::None => {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user