From 6cfda77813e1144393ad86d0d60c0b3369a1961c Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Tue, 29 Sep 2020 14:33:50 -0400 Subject: [PATCH 1/3] Remove public key field from DuplicateVoteEvidence Signed-off-by: Thane Thomson --- tendermint/src/evidence.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tendermint/src/evidence.rs b/tendermint/src/evidence.rs index bd9c5adee..c5fa7137b 100644 --- a/tendermint/src/evidence.rs +++ b/tendermint/src/evidence.rs @@ -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}, }; @@ -26,8 +26,6 @@ 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")] From 25fe076d58cb2b3d6b86fd60b39e1206c9ea1ddc Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Tue, 29 Sep 2020 14:38:02 -0400 Subject: [PATCH 2/3] Remove PubKey field from fixture Signed-off-by: Thane Thomson --- rpc/tests/support/block_with_evidences.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rpc/tests/support/block_with_evidences.json b/rpc/tests/support/block_with_evidences.json index 0347b7e93..310d604fd 100644 --- a/rpc/tests/support/block_with_evidences.json +++ b/rpc/tests/support/block_with_evidences.json @@ -43,10 +43,6 @@ { "type": "tendermint/DuplicateVoteEvidence", "value": { - "PubKey": { - "type": "tendermint/PubKeyEd25519", - "value": "MjQn17Z4VocTjeHm60JVjPV9A6hUTKYSNDTpQiglXlY=" - }, "VoteA": { "type": 1, "height": "21", From a2a2e032028252eacded174c431560c71a499473 Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Tue, 29 Sep 2020 17:06:38 -0400 Subject: [PATCH 3/3] Update vote field names for duplicate vote evidence Signed-off-by: Thane Thomson --- rpc/tests/support/block_with_evidences.json | 4 ++-- tendermint/src/evidence.rs | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rpc/tests/support/block_with_evidences.json b/rpc/tests/support/block_with_evidences.json index 310d604fd..efa9f7050 100644 --- a/rpc/tests/support/block_with_evidences.json +++ b/rpc/tests/support/block_with_evidences.json @@ -43,7 +43,7 @@ { "type": "tendermint/DuplicateVoteEvidence", "value": { - "VoteA": { + "vote_a": { "type": 1, "height": "21", "round": "0", @@ -59,7 +59,7 @@ "validator_index": "0", "signature": "JDVzUjWVP9qWZJpKmN14FvmS4mXoLnwW7C1UjFtNQrVTQpL+ONg+IkYKGzVTDQtpOcGDbOLC2dbKvY/OToaWDA==" }, - "VoteB": { + "vote_b": { "type": 1, "height": "21", "round": "0", diff --git a/tendermint/src/evidence.rs b/tendermint/src/evidence.rs index c5fa7137b..553fbcb3a 100644 --- a/tendermint/src/evidence.rs +++ b/tendermint/src/evidence.rs @@ -26,9 +26,7 @@ pub enum Evidence { /// Duplicate vote evidence #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] pub struct DuplicateVoteEvidence { - #[serde(rename = "VoteA")] vote_a: Vote, - #[serde(rename = "VoteB")] vote_b: Vote, }