Skip to content

Commit

Permalink
minor(virto-node): add logs to code_hash_provider method
Browse files Browse the repository at this point in the history
  • Loading branch information
pandres95 committed Jul 12, 2024
1 parent 99a19c7 commit 76d4055
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0-only"
name = "virto-node"
publish = false
repository.workspace = true
version = "0.13.1"
version = "0.13.2"

[[bin]]
name = "virto-node"
Expand Down
8 changes: 7 additions & 1 deletion node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,13 @@ fn start_consensus(
para_client: client.clone(),
para_backend: backend,
relay_client: relay_chain_interface,
code_hash_provider: move |block_hash| client.code_at(block_hash).ok().map(|c| ValidationCode::from(c).hash()),
code_hash_provider: move |block_hash| {
use polkadot_cli::service::HeaderProvider;
let code_hash = client.code_at(block_hash).ok().map(|c| ValidationCode::from(c).hash());
let number = client.number(block_hash).expect("block exists; qed");
log::trace!(">>> providing code hash for Aura: block_number = {number:?}, block_hash = {block_hash:?}, code_hash = {code_hash:?} <<<");
client.code_at(block_hash).ok().map(|c| ValidationCode::from(c).hash())
},
sync_oracle,
keystore,
collator_key,
Expand Down
2 changes: 1 addition & 1 deletion runtime/kreivo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ homepage.workspace = true
license = "GPL-3.0-only"
name = "kreivo-runtime"
repository.workspace = true
version = "0.13.1"
version = "0.13.2"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down

0 comments on commit 76d4055

Please sign in to comment.