-
Notifications
You must be signed in to change notification settings - Fork 472
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
Implemented parity_set #198
Conversation
fix tests
tested code and behavior with dev node
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.
Looks good, few minor issues
src/api/mod.rs
Outdated
@@ -18,6 +19,7 @@ pub use self::parity_accounts::ParityAccounts; | |||
pub use self::personal::Personal; | |||
pub use self::web3::Web3 as Web3Api; | |||
pub use self::traces::Traces; | |||
pub use self::parity_set::ParitySet; |
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 keep sorted.
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.
Sorry! Fixed
src/api/parity_set.rs
Outdated
impl<T: Transport> Namespace<T> for ParitySet<T> { | ||
fn new(transport: T) -> Self | ||
where | ||
Self: Sized, |
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.
I don't think the bound is required
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.
Correct! Works well too if bound is not present.
src/api/parity_set.rs
Outdated
impl<T: Transport> ParitySet<T> { | ||
|
||
/// Set Parity to accept non-reserved peers (default behavior) | ||
pub fn parity_accept_non_reserved_peers(&self) -> CallFuture<bool, T::Out> { |
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.
Can we drop the parity_
prefix?
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.
Yes! With parity_
prefix its a bit repetitive :)
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.
Awesome, thank you!
Hey, just as an FYI |
Thank you!! ^^ |
Am i good to add peer listing to |
Hi! Sorry for the delay answering. In my own opinion I think |
I agree with @jordipainan . It would probably fit better on anothre namespace like |
I treat namespaces as structs that correspond to the first part of the RPC method name (in this case Since it might make sense to logically group some methods together (like I'd prefer to keep a simple rule of thumb where methods are placed in the codebase, moving arbitrary methods between the namespaces doesn't seem like a good idea. |
I understand your point of view, perhaps it is easier for me to find the methods the way I have described, but if in general you think that this approach can lead to confusion and does not match with what was previously developed, go ahead I trust in your criteria :) |
parity_set
tested on a dev nodeparity_setTransactionsLimit
(issue opened)setTxGasLimit
is deprecated (node ignores the request, but stills in wiki so we can remove when docs upgrade)setMinGasPrice
is deprecated (node ignores the request, but stills in wiki so we can remove when docs upgrade)All methods are implemented but 1 not working and 2 deprecated. I took the approach to implement everything but maybe you think its better to remove all 3. We can remove code so its fine :)
A big thank you to @CPerezz helping me with return values ^^