Refactor sr-api to not depend on client anymore#4086
Conversation
|
I know we want to go fast, but I'm not a fan of marking a PR that touches 2500 lines of code as "insubstantial" and without any description. |
|
That was by mistake and I already have removed that (before your comment :P). |
tomusdrw
left a comment
There was a problem hiding this comment.
lgtm, few minor grumbles
core/block-builder/src/lib.rs
Outdated
| @@ -1,4 +1,4 @@ | |||
| // Copyright 2017-2019 Parity Technologies (UK) Ltd. | |||
| // Copyright 2018-2019 Parity Technologies (UK) Ltd. | |||
There was a problem hiding this comment.
Why is the previous line changed to 2019 only while here we bumped the year?
There was a problem hiding this comment.
Probably some copy paste error by me.
core/client/src/client.rs
Outdated
| use header_metadata::{HeaderMetadata, CachedHeaderMetadata}; | ||
|
|
||
| use sr_api::{CallRuntimeAt, ConstructRuntimeApi, Core as CoreApi, ProofRecorder, InitializeBlock}; | ||
|
|
There was a problem hiding this comment.
Please let's not do this empty lines. The grouping logic is arbitrary and not clear, I'd rather have a single block sorted alphabetically.
core/consensus/common/src/error.rs
Outdated
| /// Error while working with inherent data. | ||
| #[display(fmt="InherentData error: {}", _0)] | ||
| InherentData(String), | ||
| #[display(fmt="InherentData error: {:?}", _0)] |
There was a problem hiding this comment.
Might be a messy output, why doesn't inherents::Error implement Display?
There was a problem hiding this comment.
It implements it now, but not at the point where I made this change.
| #[display(fmt = "Creating inherents failed: {}", _0)] | ||
| CreateInherents(RuntimeString), | ||
| #[display(fmt = "Creating inherents failed: {:?}", _0)] | ||
| CreateInherents(inherents::Error), |
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
No description provided.