-
Notifications
You must be signed in to change notification settings - Fork 70
Group chain traits #495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group chain traits #495
Conversation
e79c18d to
da7deaf
Compare
|
Seems a nice thing, in fact we use a similar trait grouping in I would use a name like Also I wouldn't replace the |
da7deaf to
6848f37
Compare
|
agreed, nice naming! applied on 6848f37 |
6848f37 to
80c6c72
Compare
4fe2f93 to
bce7340
Compare
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.
Only some final nits.
I would also replace the RpcChain trait defined in florestad/src/json_rpc/server.rs to this:
/// Utility trait to ensure that the chain in our RPC server implements all the necessary traits
pub trait RpcChain: ThreadSafeChain + Clone {}
impl<T: ThreadSafeChain + Clone> RpcChain for T {}64e1558 to
1f1f612
Compare
|
Applied @JoseSK999 suggestions |
1f1f612 to
7f5fffd
Compare
|
Applied @JoseSK999 suggestions |
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.
ACK 7f5fffd
|
ACK 7f5fffd |
What is the purpose of this pull request?
Which crates are being modified?
Description
We rely on
BlockchainInterfaceandUpdatableChainStatetraits to define how we expect the backend chain to be but it can became kind of repetitive mentioning every single trait. This is a try to mitigate this.Notes to the reviewers
Theres other ways to to different what i did here, that is, reducing trait bounds verbosity... Thoughts ?
Author Checklist
just pcc(recommended but slower)just lint-features '-- -D warnings' && cargo test --releaseFinally, you are encouraged to sign all your commits (it proves authorship and guards against tampering—see How (and why) to sign Git commits and GitHub's guide to signing commits).