Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Add CIDv0 RPC #5414

Merged
merged 4 commits into from
Apr 8, 2017
Merged

Add CIDv0 RPC #5414

merged 4 commits into from
Apr 8, 2017

Conversation

keorn
Copy link

@keorn keorn commented Apr 6, 2017

No description provided.

@keorn keorn added A0-pleasereview 🤓 Pull request needs code review. B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. M6-rpcapi 📣 RPC API. labels Apr 6, 2017
@@ -342,4 +342,8 @@ impl Parity for ParityClient {
capability: Capability::Light,
})
}

fn ipfs_cid(&self, _content: Bytes) -> Result<String, Error> {
Err(errors::light_unimplemented(None))
Copy link
Contributor

Choose a reason for hiding this comment

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

why not implement this for the light client as well?

@@ -224,6 +225,14 @@ pub fn encryption_error<T: fmt::Debug>(error: T) -> Error {
}
}

pub fn encoding_error<T: fmt::Debug>(error: T) -> Error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

_error suffix is not really necessary

Copy link
Author

Choose a reason for hiding this comment

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

Should I change all the other functions in this module too?

Copy link
Contributor

Choose a reason for hiding this comment

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

if so, worth a separate PR.

@gavofyork
Copy link
Contributor

does "add it for the light client as well" really mean a verbatim duplicate of that function? suffice it to say i consider this rather bad practice.

@gavofyork gavofyork added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Apr 6, 2017
@rphmeier
Copy link
Contributor

rphmeier commented Apr 6, 2017

It's mostly a symptom of the fact that the parity_ API does just about everything in a single trait. Doing an Eth, EthFilter split into ParityChain and ParityMisc would let us at least make ParityMisc generic.

For now, we could toss cid into helpers, but we're still duplicating the function definition and call into that helper.

@keorn
Copy link
Author

keorn commented Apr 6, 2017

@rphmeier Dont try to defend, that was just embarrassing...

@keorn keorn added A0-pleasereview 🤓 Pull request needs code review. and removed A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels Apr 6, 2017
@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Apr 8, 2017
@gavofyork gavofyork merged commit 20d4e71 into master Apr 8, 2017
@gavofyork gavofyork deleted the cid-rpc branch April 8, 2017 11:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. M6-rpcapi 📣 RPC API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants