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

[rpc] add raw field into BlockView to support get raw block #3489

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

coldnight
Copy link
Contributor

@coldnight coldnight commented Jun 28, 2022

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: #3479

What is the new behavior?

  • Add raw field into GetBlockOption to support specify it to get raw block
  • Add optional raw field into BlockView and fill it when above field is set to true.

Other information

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #3489 (2bfd6f9) into master (baae183) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3489      +/-   ##
==========================================
- Coverage   30.98%   30.93%   -0.05%     
==========================================
  Files         500      500              
  Lines       46806    46828      +22     
  Branches    22109    22122      +13     
==========================================
- Hits        14497    14480      -17     
- Misses      17978    18097     +119     
+ Partials    14331    14251      -80     
Flag Coverage Δ
unittests 30.93% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
rpc/api/src/chain/mod.rs 12.50% <0.00%> (-0.54%) ⬇️
rpc/api/src/types.rs 14.02% <0.00%> (+0.35%) ⬆️
rpc/server/src/module/chain_rpc.rs 3.40% <0.00%> (-0.07%) ⬇️
rpc/server/src/module/pubsub.rs 34.47% <0.00%> (-0.10%) ⬇️
consensus/src/consensus.rs 39.69% <0.00%> (-15.87%) ⬇️
vm/types/src/language_storage_ext.rs 37.50% <0.00%> (-12.50%) ⬇️
network-p2p/src/transport.rs 15.10% <0.00%> (-11.32%) ⬇️
vm/types/src/on_chain_config/vm_config.rs 35.00% <0.00%> (-10.00%) ⬇️
cmd/starcoin/src/cli_state.rs 39.03% <0.00%> (-9.75%) ⬇️
...ccount_config/resources/module_upgrade_strategy.rs 34.29% <0.00%> (-8.57%) ⬇️
... and 76 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 baae183...2bfd6f9. Read the comment docs.

@coldnight coldnight force-pushed the feat-block-raw-body branch from e63a308 to 6255efb Compare June 28, 2022 10:58
rpc/api/src/types.rs Outdated Show resolved Hide resolved
@jolestar jolestar linked an issue Jun 29, 2022 that may be closed by this pull request
@coldnight coldnight force-pushed the feat-block-raw-body branch from 6255efb to 0c3c829 Compare June 29, 2022 02:47
@coldnight coldnight changed the title [rpc] add raw_body into BlockView to support get raw block [rpc] add raw field into BlockView to support get raw block Jun 29, 2022
@coldnight coldnight requested a review from jolestar June 29, 2022 03:22
rpc/api/src/types.rs Outdated Show resolved Hide resolved
@coldnight coldnight force-pushed the feat-block-raw-body branch from 0c3c829 to 786e7ff Compare June 29, 2022 07:14
@coldnight coldnight requested a review from jolestar June 29, 2022 07:15
Copy link
Member

@jolestar jolestar left a comment

Choose a reason for hiding this comment

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

LGTM

@coldnight coldnight force-pushed the feat-block-raw-body branch from 786e7ff to 2bfd6f9 Compare June 29, 2022 23:33
@jolestar jolestar merged commit 2e57fb3 into starcoinorg:master Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] RPC support get raw block
2 participants