Skip to content

Commit

Permalink
Remove public key field from DuplicateVoteEvidence (#589)
Browse files Browse the repository at this point in the history
* Remove public key field from DuplicateVoteEvidence

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove PubKey field from fixture

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update vote field names for duplicate vote evidence

Signed-off-by: Thane Thomson <connect@thanethomson.com>
  • Loading branch information
thanethomson authored Sep 30, 2020
1 parent 34d7d02 commit 3e9ffa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
8 changes: 2 additions & 6 deletions rpc/tests/support/block_with_evidences.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@
{
"type": "tendermint/DuplicateVoteEvidence",
"value": {
"PubKey": {
"type": "tendermint/PubKeyEd25519",
"value": "MjQn17Z4VocTjeHm60JVjPV9A6hUTKYSNDTpQiglXlY="
},
"VoteA": {
"vote_a": {
"type": 1,
"height": "21",
"round": "0",
Expand All @@ -63,7 +59,7 @@
"validator_index": "0",
"signature": "JDVzUjWVP9qWZJpKmN14FvmS4mXoLnwW7C1UjFtNQrVTQpL+ONg+IkYKGzVTDQtpOcGDbOLC2dbKvY/OToaWDA=="
},
"VoteB": {
"vote_b": {
"type": 1,
"height": "21",
"round": "0",
Expand Down
6 changes: 1 addition & 5 deletions tendermint/src/evidence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use std::slice;
use {
crate::{block::signed_header::SignedHeader, serializers, PublicKey, Vote},
crate::{block::signed_header::SignedHeader, serializers, Vote},
serde::{Deserialize, Serialize},
};

Expand All @@ -26,11 +26,7 @@ pub enum Evidence {
/// Duplicate vote evidence
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
pub struct DuplicateVoteEvidence {
#[serde(rename = "PubKey")]
pub_key: PublicKey,
#[serde(rename = "VoteA")]
vote_a: Vote,
#[serde(rename = "VoteB")]
vote_b: Vote,
}

Expand Down

0 comments on commit 3e9ffa7

Please sign in to comment.