-
Notifications
You must be signed in to change notification settings - Fork 37
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
jellyfish-core protocol adapter and error handling #41
Conversation
… into fuxingloh/container-json-bigint
updated jest and package config
size-limit report 📦
|
Codecov Report
@@ Coverage Diff @@
## main #41 +/- ##
==========================================
+ Coverage 91.83% 93.02% +1.18%
==========================================
Files 8 10 +2
Lines 147 172 +25
Branches 18 19 +1
==========================================
+ Hits 135 160 +25
Misses 12 12
Continue to review full report at Codecov.
|
isoperator: boolean | ||
masternodeid?: string | ||
masternodeoperator?: string | ||
masternodestate?: 'PRE_ENABLED' | 'ENABLED' | 'PRE_RESIGNED' | 'RESIGNED' | 'PRE_BANNED' | 'BANNED' |
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.
Nice. I need to add this on my masternode PR (I only have enabled, pre_resigned and resigned)
* added better Create Pull Request body * tested hex_encoder * added module * rename HexEncoder method * updated readme and module * added block.ts with test * added raw.block.ts with test * added script.activity.ts with test * added the rest without testing * fixed ci.yml script
* added better Create Pull Request body * tested hex_encoder * added module * rename HexEncoder method * updated readme and module * added block.ts with test * added raw.block.ts with test * added script.activity.ts with test * added the rest without testing * fixed ci.yml script
What kind of PR is this?:
/kind feature
What this PR does / why we need it:
This pull request implements the jellyfish-core abstraction for protocol adapting and error handling.
JellyfishClient
being an abstract class allows the ability to adapt to any protocol when introduced, ws, https etc while being simple to use. This implementation structure can be observed inContainerAdapterClient
where it is used to testjellyfish-core
implementations.RPC categories are grouped into
jellyfish-core/src/category/*.ts
e.g.category/mining.ts
this allows a protocol agnostic implementation of the RPC. All concerns are grouped within onets
file for better developer experience of browsing and maintaining code. (might refactor this in the future, but we can leave it as it is now)JellyfishError
encapsulate RPC errors from DeFiChain within a structure. This allow forinstancesof
ortype of
error handling with rich structure.Which issue(s) does this PR fixes?:
Fixes #16 and #19
Additional comments?:
Also made changes to testcontainers:
json-bigint
in favour of a new cleaner implementation that is to be introducedcontainer.post(string): string
method for test adapting