mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
adder collator updates (#1904)
* Fix adder collator README * Add trivial logging to show that collator collates * Update parachain/test-parachains/adder/collator/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -100,12 +100,18 @@ impl Collator {
|
||||
) -> Box<dyn Fn(Hash, &ValidationData) -> Pin<Box<dyn Future<Output = Option<Collation>> + Send>> + Send + Sync> {
|
||||
let state = self.state.clone();
|
||||
|
||||
Box::new(move |_, validation_data| {
|
||||
Box::new(move |relay_parent, validation_data| {
|
||||
let parent = HeadData::decode(&mut &validation_data.persisted.parent_head.0[..])
|
||||
.expect("Decodes parent head");
|
||||
|
||||
let (block_data, head_data) = state.lock().unwrap().advance(parent);
|
||||
|
||||
log::info!(
|
||||
"created a new collation on relay-parent({}): {:?}",
|
||||
relay_parent,
|
||||
block_data,
|
||||
);
|
||||
|
||||
let collation = Collation {
|
||||
upward_messages: Vec::new(),
|
||||
new_validation_code: None,
|
||||
|
||||
Reference in New Issue
Block a user