Skip to content

rename Accum -> ProposerPriority - #2932

Merged
ebuchman merged 2 commits into
developfrom
2915_rename_accum
Nov 28, 2018
Merged

ebuchman merged 2 commits into
developfrom
2915_rename_accum

Conversation

@liamsi

@liamsi liamsi commented Nov 28, 2018 •

Copy link
Copy Markdown
Contributor

ref #2915

  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md

 - rename fields, methods, comments, tests
@liamsi liamsi changed the title rename Accum -> ProposerPriority: rename Accum -> ProposerPriority Nov 28, 2018

@melekes melekes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💎

@liamsi

liamsi commented Nov 28, 2018 •

Copy link
Copy Markdown
Contributor Author

Merging in develop shortly to resolve the conflicts.

func randValidator_() *Validator {
val := NewValidator(randPubKey(), cmn.RandInt64())
val.Accum = cmn.RandInt64()
val.ProposerPriority = cmn.RandInt64() % MaxTotalVotingPower

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I had to change this too (unrelated to the renaming). Without this, TestValidatorSetBasic would panic (and fail) on rare occasions. Namely, if cmn.RandInt64() > MaxTotalVotingPower.

@codecov-io

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (develop@3f987ad). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff             @@
##             develop    #2932   +/-   ##
==========================================
  Coverage           ?   62.76%           
==========================================
  Files              ?      212           
  Lines              ?    17294           
  Branches           ?        0           
==========================================
  Hits               ?    10855           
  Misses             ?     5524           
  Partials           ?      915
Impacted Files Coverage Δ
rpc/core/consensus.go 0% <ø> (ø)
consensus/state.go 79.64% <100%> (ø)
state/execution.go 72.79% <100%> (ø)
state/state.go 90.9% <100%> (ø)
state/store.go 69.28% <100%> (ø)
p2p/metrics.go 17.94% <100%> (ø)

@ValarDragon ValarDragon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome!

@ebuchman
ebuchman merged commit b30c34e into develop Nov 28, 2018
@ebuchman
ebuchman deleted the 2915_rename_accum branch November 28, 2018 20:35
cboh4 pushed a commit to scrtlabs/tendermint that referenced this pull request Apr 7, 2025
…int#2932)

Closes tendermint#2923 

Caches the block hash to ensure we only compute it once in consensus
execution.

---

#### PR checklist

- [x] Tests written/updated - not sure what test I should write, any
suggestions?
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<hr>This is an automatic backport of pull request tendermint#2924 done by
[Mergify](https://mergify.com).

---------

Co-authored-by: Dev Ojha <[email protected]>
Co-authored-by: Anton Kaliaev <[email protected]>
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.

5 participants