mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 15:21:05 +00:00
update substrate (#259)
* WIP * merging select_chain * WIP * update to point to gui-polkadot-master * Fix collator * update gui-polkadot-master and fix * fix unwraps * better returning an error
This commit is contained in:
committed by
Robert Habermeier
parent
ac2b9168ac
commit
6d778c99d2
@@ -27,10 +27,11 @@ use polkadot_primitives::parachain::{
|
||||
ConsolidatedIngressRoots,
|
||||
};
|
||||
use substrate_primitives::crypto::UncheckedInto;
|
||||
use sr_primitives::traits::Block as BlockT;
|
||||
use codec::Encode;
|
||||
use substrate_network::{
|
||||
PeerId, PeerInfo, ClientHandle, Context, config::Roles,
|
||||
message::{BlockRequest, generic::ConsensusMessage},
|
||||
message::{BlockRequest, generic::{ConsensusMessage, FinalityProofRequest}},
|
||||
specialization::NetworkSpecialization, generic_message::Message as GenericMessage
|
||||
};
|
||||
|
||||
@@ -47,10 +48,6 @@ struct TestContext {
|
||||
}
|
||||
|
||||
impl Context<Block> for TestContext {
|
||||
fn client(&self) -> &ClientHandle<Block> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn report_peer(&mut self, peer: PeerId, reputation: i32) {
|
||||
let reputation = self.reputations.get(&peer).map_or(reputation, |v| v + reputation);
|
||||
self.reputations.insert(peer.clone(), reputation);
|
||||
@@ -62,14 +59,6 @@ impl Context<Block> for TestContext {
|
||||
}
|
||||
}
|
||||
|
||||
fn peer_info(&self, _peer: &PeerId) -> Option<PeerInfo<Block>> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn send_block_request(&mut self, _who: PeerId, _request: BlockRequest<Block>) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn send_consensus(&mut self, _who: PeerId, _consensus: ConsensusMessage) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
@@ -360,12 +360,12 @@ impl Knowledge {
|
||||
// generated by valid execution.
|
||||
match *statement {
|
||||
GenericStatement::Candidate(ref c) => {
|
||||
let mut entry = self.candidates.entry(c.hash()).or_insert_with(Default::default);
|
||||
let entry = self.candidates.entry(c.hash()).or_insert_with(Default::default);
|
||||
entry.knows_block_data.push(from.clone());
|
||||
entry.knows_extrinsic.push(from);
|
||||
}
|
||||
GenericStatement::Valid(ref hash) => {
|
||||
let mut entry = self.candidates.entry(*hash).or_insert_with(Default::default);
|
||||
let entry = self.candidates.entry(*hash).or_insert_with(Default::default);
|
||||
entry.knows_block_data.push(from.clone());
|
||||
entry.knows_extrinsic.push(from);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user