-
Notifications
You must be signed in to change notification settings - Fork 101
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
improvement(best-orders): return an rpc error when we can't find best orders #2318
base: dev
Are you sure you want to change the base?
Conversation
|
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.
Since it's been a month, can you share the status quo of this PR?
Changes seem harmless, so the current status is also LGTM.
@onur-ozkan there is one last place we ask for any peer's response but we don't error. |
Please ping me once this is on "pending review" status. |
ping @onur-ozkan :) |
some tests are failing now because when a single seed node in a network does orderbook request it must fail (no other seed node to reply). |
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.
Just to make sure, when remote peers return no data, will we still be able to return an empty list as a response?
yup, a no data (i.e. empty vector/set) response is a valid response. |
Can you pull |
If the local node is a seed node, we should never return an error, as it has already subscribed to all topics and possesses the order book. It should still request and fill the order book in case it doesn't have the latest state or just came online, but if no other seeds respond, we should return the local copy of the order book. For test cases you mentioned, we should run this single node as a seed node. We will still get this issue #2228 with seednodes, but it's a GUI issue so not a problem. What do you think @mariocynicys ? |
don't forget to pull the latest commit @mariocynicys, I wanted to see which tests were failing |
agreed. |
Return an RPC error in best orders rpc if we were not able to get the best orders because nobody in the network replied to our p2p request.
This is saner that returning a successful result with no best orders inside.
Kinda addresses #2228