Skip to content

Move VoteCollector into Tendermint #1783

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

Merged

Conversation

foriequal0
Copy link
Contributor

VoteCollector doesn't have to be generic since it is only used in tendermint. So I've removed trait Message, and SoloMessage which is its dummy implementation.

majecty
majecty previously approved these changes Sep 23, 2019
Copy link
Contributor

@majecty majecty left a comment

Choose a reason for hiding this comment

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

Good! I have wanted this patch!

HoOngEe
HoOngEe previously approved these changes Sep 24, 2019
@foriequal0
Copy link
Contributor Author

I have to resolve the warning.

error: large size difference between variants
  --> core/src/consensus/stake/actions.rs:66:5
   |
66 | /     ReportDoubleVote {
67 | |         message1: ConsensusMessage,
68 | |         message2: ConsensusMessage,
69 | |     },
   | |_____^
   |
   = note: `-D clippy::large-enum-variant` implied by `-D warnings`
help: consider boxing the large fields to reduce the total size of the enum
  --> core/src/consensus/stake/actions.rs:66:5
   |
66 | /     ReportDoubleVote {
67 | |         message1: ConsensusMessage,
68 | |         message2: ConsensusMessage,
69 | |     },
   | |_____^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant

ConsensusMessage is a large struct, therefore it bloats the enum
@foriequal0 foriequal0 dismissed stale reviews from HoOngEe and majecty via 5f1e245 September 25, 2019 07:20
@foriequal0 foriequal0 requested a review from HoOngEe September 25, 2019 07:52
@foriequal0
Copy link
Contributor Author

The test is flaky. I'll rebase and merge it.

@foriequal0 foriequal0 merged commit 56bacfb into CodeChain-io:master Sep 26, 2019
@foriequal0 foriequal0 deleted the feature/tendermint-vote-collector branch September 26, 2019 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants