-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the previous line changed to 2019
only while here we bumped the year?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably some copy paste error by me.
core/client/src/client.rs
Outdated
@@ -53,11 +53,11 @@ use consensus::{ | |||
}; | |||
use header_metadata::{HeaderMetadata, CachedHeaderMetadata}; | |||
|
|||
use sr_api::{CallRuntimeAt, ConstructRuntimeApi, Core as CoreApi, ProofRecorder, InitializeBlock}; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -35,8 +35,8 @@ pub enum Error { | |||
#[display(fmt="Timer error: {}", _0)] | |||
FaultyTimer(std::io::Error), | |||
/// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a messy output, why doesn't inherents::Error
implement Display
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
No description provided.