Skip to content
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

Add blockchain.getBlockStats, blockchain.getBestBlockHash RPC #256

Merged
merged 14 commits into from
May 27, 2021

Conversation

siradji
Copy link
Contributor

@siradji siradji commented May 19, 2021

What kind of PR is this?:

/kind Feature

What this PR does / why we need it:

implementation of RCP #48

Which issue(s) does this PR fixes?:

Fixes #

Additional comments?:

@siradji siradji requested review from fuxingloh and canonbrother May 19, 2021 10:46
@siradji siradji requested a review from jingyi2811 as a code owner May 19, 2021 10:46
@netlify
Copy link

netlify bot commented May 19, 2021

✔️ Deploy Preview for jellyfish-defi ready!

🔨 Explore the source changes: 26eeb71

🔍 Inspect the deploy log: https://app.netlify.com/sites/jellyfish-defi/deploys/60af24f3a777e20007e006d6

😎 Browse the preview: https://deploy-preview-256--jellyfish-defi.netlify.app

@siradji siradji changed the title getBlockStats, getBestBlockHash RCP implementation getBlockStats, getBestBlockHash RPC implementation May 19, 2021
@siradji siradji self-assigned this May 19, 2021
@defichain-bot
Copy link
Contributor

@siradji: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind fix
  • /kind chore
  • /kind docs
  • /kind refactor
  • /kind dependencies
Details

I am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the DeFiCh/oss-governance-bot repository.

@github-actions
Copy link

github-actions bot commented May 19, 2021

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/jellyfish/dist/jellyfish.umd.js 19.48 KB (+0.2% 🔺) 390 ms (+0.2% 🔺) 162 ms (+2.39% 🔺) 552 ms

@codecov
Copy link

codecov bot commented May 19, 2021

Codecov Report

Merging #256 (26eeb71) into main (241f390) will increase coverage by 0.42%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #256      +/-   ##
==========================================
+ Coverage   96.49%   96.92%   +0.42%     
==========================================
  Files          85       89       +4     
  Lines        2228     2408     +180     
  Branches      287      308      +21     
==========================================
+ Hits         2150     2334     +184     
+ Misses         78       74       -4     
Impacted Files Coverage Δ
...ages/jellyfish-api-core/src/category/blockchain.ts 100.00% <100.00%> (ø)
packages/jellyfish-api-core/src/category/wallet.ts 100.00% <0.00%> (ø)
...ackages/jellyfish-api-core/src/category/account.ts 100.00% <0.00%> (ø)
...ellyfish-transaction/src/script/defi/dftx_token.ts 100.00% <0.00%> (ø)
...tcontainers/src/chains/reg_test_container/index.ts 100.00% <0.00%> (ø)
...ish-transaction/src/script/defi/dftx_masternode.ts 100.00% <0.00%> (ø)
...lyfish-transaction/src/script/defi/dftx_oracles.ts 100.00% <0.00%> (ø)
...ellyfish-transaction/src/script/defi/dftx_price.ts 100.00% <0.00%> (ø)
...jellyfish-transaction/src/buffer/buffer_bitmask.ts 100.00% <0.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 241f390...26eeb71. Read the comment docs.

@fuxingloh fuxingloh removed the needs/kind Needs kind label label May 19, 2021
Copy link
Contributor

@fuxingloh fuxingloh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please format your code properly, I am going to rebase your code from main. There was an issue with CI not failing due to lint issue.

@fuxingloh fuxingloh marked this pull request as draft May 19, 2021 12:30
Copy link
Contributor

@fuxingloh fuxingloh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check your PR before you open them. and rebase main, your code coverage is not accurate.

@siradji siradji force-pushed the siradji/getblockstats branch 2 times, most recently from 06c0c98 to 2f1e637 Compare May 19, 2021 23:16
@siradji siradji force-pushed the siradji/getblockstats branch from 49e2a3f to 2df1419 Compare May 24, 2021 14:28
@codeclimate
Copy link

codeclimate bot commented May 24, 2021

Code Climate has analyzed commit 26eeb71 and detected 0 issues on this pull request.

View more on Code Climate.

@fuxingloh fuxingloh changed the title getBlockStats, getBestBlockHash RPC implementation Add blockchain.getBlockStats, blockchain.getBestBlockHash RPC May 24, 2021
@siradji siradji marked this pull request as ready for review May 26, 2021 07:47
@fuxingloh fuxingloh enabled auto-merge (squash) May 26, 2021 11:32
@fuxingloh fuxingloh self-requested a review May 26, 2021 14:46
Copy link
Contributor

@fuxingloh fuxingloh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fuxingloh fuxingloh marked this pull request as draft May 26, 2021 14:47
auto-merge was automatically disabled May 26, 2021 14:47

Pull request was converted to draft

@siradji siradji marked this pull request as ready for review May 26, 2021 15:46
@fuxingloh fuxingloh self-requested a review May 26, 2021 15:59
@fuxingloh fuxingloh requested a review from canonbrother May 27, 2021 04:50
@fuxingloh fuxingloh enabled auto-merge (squash) May 27, 2021 04:57
@fuxingloh fuxingloh merged commit efc0b68 into main May 27, 2021
@fuxingloh fuxingloh deleted the siradji/getblockstats branch May 27, 2021 05:11
monstrobishi pushed a commit that referenced this pull request May 27, 2021
* getBlockStats, getBestBlockHash  RCP implementation

* Fixed and implemented requested changes.

* Fixed requested changes

* Minor fixes

* Changed assertion to toStricEquals, additional test for getblockstats

* Update packages/jellyfish-api-core/src/category/blockchain.ts

Co-authored-by: Fuxing Loh <[email protected]>

* Update packages/jellyfish-api-core/__tests__/category/blockchain.test.ts

Co-authored-by: Fuxing Loh <[email protected]>

* Update packages/jellyfish-api-core/src/category/blockchain.ts

Co-authored-by: Fuxing Loh <[email protected]>

* Additional test cases for getBlockStats

* Minor fixes

* Update blockchain.md

* Minor fixes

* Update blockchain.md

Co-authored-by: Fuxing Loh <[email protected]>
fuxingloh added a commit that referenced this pull request May 28, 2021
* updated to latest image

* Updated to 1.7.0 rc5 tag

* Fix mining test

* Initial setup

* Updated test

* Updated EunosHeight in RegTest container

* Added override pair

* Tests passing, added docs

* Increased code coverage

* Add `blockchain.getBlockStats`, `blockchain.getBestBlockHash` RPC (#256)

* getBlockStats, getBestBlockHash  RCP implementation

* Fixed and implemented requested changes.

* Fixed requested changes

* Minor fixes

* Changed assertion to toStricEquals, additional test for getblockstats

* Update packages/jellyfish-api-core/src/category/blockchain.ts

Co-authored-by: Fuxing Loh <[email protected]>

* Update packages/jellyfish-api-core/__tests__/category/blockchain.test.ts

Co-authored-by: Fuxing Loh <[email protected]>

* Update packages/jellyfish-api-core/src/category/blockchain.ts

Co-authored-by: Fuxing Loh <[email protected]>

* Additional test cases for getBlockStats

* Minor fixes

* Update blockchain.md

* Minor fixes

* Update blockchain.md

Co-authored-by: Fuxing Loh <[email protected]>

* Added remove oracle and tests

* Fix test

* Tidy test

* Apply suggestions from code review

Co-authored-by: Fuxing Loh <[email protected]>

Co-authored-by: Fuxing Loh <[email protected]>
Co-authored-by: Suraj Auwal <[email protected]>
Co-authored-by: Fuxing Loh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants