mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Rewrite client handling (#1531)
* Rewrite client handling We are supporting muliple polkadot-like chains and all have different client types. This pr reworks the client handling by having all of them in one enum combined. Besides that, there is added a special trait `ExecuteWithClient` to use the internal client. * Apply suggestions from code review Co-authored-by: Robert Habermeier <rphmeier@gmail.com> * Up the versions * Fix Cargo.lock * Fix merge conflict * ...................... * ....v2 * yep * I'm dumb... * Browser lol Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
@@ -89,8 +89,11 @@ impl ParachainContext for AdderContext {
|
||||
let encoded_head = HeadData(next_head.encode());
|
||||
let encoded_body = BlockData(next_body.encode());
|
||||
|
||||
println!("Created collation for #{}, post-state={}",
|
||||
next_head.number, next_body.state.overflowing_add(next_body.add).0);
|
||||
println!(
|
||||
"Created collation for #{}, post-state={}",
|
||||
next_head.number,
|
||||
next_body.state.overflowing_add(next_body.add).0,
|
||||
);
|
||||
|
||||
db.insert(next_head.clone(), next_body);
|
||||
ready(Some((encoded_body, encoded_head)))
|
||||
@@ -100,9 +103,9 @@ impl ParachainContext for AdderContext {
|
||||
impl BuildParachainContext for AdderContext {
|
||||
type ParachainContext = Self;
|
||||
|
||||
fn build<Client, SP>(
|
||||
fn build<SP>(
|
||||
self,
|
||||
_: Arc<Client>,
|
||||
_: collator::Client,
|
||||
_: SP,
|
||||
network: impl Network + Clone + 'static,
|
||||
) -> Result<Self::ParachainContext, ()> {
|
||||
|
||||
Reference in New Issue
Block a user