-
Notifications
You must be signed in to change notification settings - Fork 45
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
refactor: use protobuffer for API storenode queries #1248
Conversation
Jenkins BuildsClick to see older builds (1)
|
@@ -0,0 +1,12 @@ | |||
package common |
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 you make the file snake case? storenode_requestor.go?
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.
yup
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
|
||
var params Parameters | ||
params.selectedPeer = peerID | ||
if params.selectedPeer == "" { |
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 am guessing peer-selection would be added later.
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. I want to get the store queries to work first as they do now, with nwaku
c6c6479
to
6bdf125
Compare
212f697
to
7b2ac04
Compare
7b2ac04
to
b6fac0f
Compare
To allow more flexibility at the moment of doing queries, instead of having custom functions that receive N different combination of parameters to do a store query, we use instead a single function which receives instead a StoreQueryRequest protobuffer
The json representation of the StoreQueryRequest matches what is used in libwaku, and since protobuffers in nwaku and go-waku are the same (and are supposed to be backward compatible), we can safely use them. It has the side effect of making the API simpler too
cc: @gabrielmer, @Ivansete-status