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: Sanitize slice data accessors for ABCI types #1140

Merged
merged 2 commits into from
Jun 11, 2022

Conversation

mzabaluev
Copy link
Contributor

@mzabaluev mzabaluev commented Jun 7, 2022

It does not make sense to access wrapped data as references to container types &Vec<u8> and &String. Expose the data as slice references instead.

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Added entry in .changelog/

It does not make sense to access wrapped data as references to
container types &Vec<u8> and &String. Expose the data as slice
references instead.
@mzabaluev mzabaluev requested a review from greg-szabo June 7, 2022 11:18
@mzabaluev mzabaluev marked this pull request as ready for review June 7, 2022 11:27
@codecov-commenter
Copy link

Codecov Report

Merging #1140 (4d1ea8e) into master (27e7f60) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@          Coverage Diff           @@
##           master   #1140   +/-   ##
======================================
  Coverage    64.7%   64.7%           
======================================
  Files         231     231           
  Lines       15637   15637           
======================================
+ Hits        10120   10122    +2     
+ Misses       5517    5515    -2     
Impacted Files Coverage Δ
rpc/src/abci/data.rs 90.9% <100.0%> (ø)
rpc/src/abci/log.rs 30.7% <100.0%> (ø)
abci/src/server.rs 78.9% <0.0%> (-1.8%) ⬇️
testgen/src/validator.rs 86.7% <0.0%> (-0.8%) ⬇️
testgen/src/header.rs 87.5% <0.0%> (-0.7%) ⬇️
tendermint/src/evidence.rs 25.3% <0.0%> (+3.7%) ⬆️

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 27e7f60...4d1ea8e. Read the comment docs.

@mzabaluev mzabaluev added rpc abci breaking code-quality Issues relating to linting configuration and general code quality labels Jun 9, 2022
@thanethomson thanethomson merged commit 6a28510 into master Jun 11, 2022
@thanethomson thanethomson deleted the mikhail/sanitize-abci-slice-accessors branch June 11, 2022 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abci breaking code-quality Issues relating to linting configuration and general code quality rpc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants