Skip to content

Conversation

@icodezjb
Copy link
Member

@icodezjb icodezjb commented Jan 1, 2024

No description provided.

runner.sync_run(|mut config| {
let components = new_partial::<
chainx_runtime::RuntimeApi,
chainx_executor::ChainXExecutor,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have 3 type runtime, maybe re-use the macro construct_async_run

let bytes = hex::decode(&self.bytes).expect("require hex string without 0x");
let epoch: EpochChangesFor<chainx_runtime::Block, Epoch> =
Decode::decode(&mut &bytes[..]).expect("Decode must success");
println!("epoch: {:?}", epoch);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can change the println! to log?


client
.insert_aux(&[(BABE_EPOCH_CHANGES_KEY, &epoch.encode()[..])], &[])
.expect("Insert to db must success");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those expect can change to Err and using ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I advice not commit this file in git? I think provide this file in validator doc is more batter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants