-
Notifications
You must be signed in to change notification settings - Fork 79
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
Split up RPC into separate packages #676
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #676 +/- ##
==========================================
+ Coverage 65.21% 65.73% +0.51%
==========================================
Files 125 128 +3
Lines 10920 10827 -93
==========================================
- Hits 7122 7117 -5
+ Misses 3516 3432 -84
+ Partials 282 278 -4
Continue to review full report at Codecov.
|
Makes no sense copying Server here.
Deduplicate and simplify code.
Which allows node to respond to `getpeers` RPC request correctly.
It's a server implementation detail, it has nothing to do with the data format itself. It also makes no sense exporing it.
Because it is a result of the RPC call.
It's just a data.
These are all RPC call results, `wrappers` package doesn't make much sense to me.
`response` is to be populated soon.
Mostly as is, no real effort done yet to optimize them, so there are still a lot of duplicates there, but at least we sort them out into different smaller packages.
It will make refactoring easier.
This includes Client struct with RPC methods and BalanceGetter implementation with NeoSCAN.
sendrawtransaction just returns a bool, sendtoaddress returns a proper transaction and that should be the same as the one we have in TransactionOutputRaw.
These might be undefined for mempool transactions, thus they should be defined as omitempty.
In case of error our own server responds with an HTTP error and proper JSON-RPC error in the body, so look there first as it has more specific data.
roman-khimov
force-pushed
the
dedup-rpc-types
branch
from
February 21, 2020 12:19
4226613
to
2f31896
Compare
@fyrchik: take a look at the updated branch, please. I think it's time to merge it. |
golangcibot
reviewed
Feb 21, 2020
Adjust structures accordingly and throw away most of them, they're useless.
We actually do emit it ourselves in String()
We have proper results now, so use those. The only left is Invoke, but that depends on another issue at the moment.
roman-khimov
force-pushed
the
dedup-rpc-types
branch
from
February 21, 2020 12:23
2f31896
to
8da2005
Compare
@roman-khimov LGTM |
roman-khimov
approved these changes
Feb 21, 2020
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #510 .