-
Notifications
You must be signed in to change notification settings - Fork 94
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
[r2r] Multi lightwalletd servers integration #1472
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.
Thanks for the PR! First review iteration :)
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.
Second review iteration.
@artemii235 if you dont mind, I decided to remove |
@laruh Yes, that's ok :) |
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 to me, thanks! @ozkanonur Could you take a look too, please? :)
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.
Great work! :) Only one note for future PR. LGTM 🔥
Fut: Future<Output = Result<tonic::Response<Res>, tonic::Status>>, | ||
Fn: FnMut(&'a mut CompactTxStreamerClient<Channel>) -> Fut, | ||
{ | ||
let mut errors = Vec::new(); |
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.
Refer to #1480, this flow isn't good solution for handling multiple http connections. In scenario where we have 4-5 urls and first 3 always times out, the process will be unacceptably long.. There are similar implementation exists which will to be refactored as well.
Could you please add TODO note top of the this function including the issue url? We can refactor all of them in different PR.
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.
good note!
done
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.
🚀
issue #927
Firstly, there is an initialization of light clients using several lightwalletd servers urls.
Then program iterates them trying to send request.
The first successful result will be returned. In other case list of errors during the whole iteration will be returned.