From a9e745db1884ace952aa36a5a8cdc6e0f7f5c8b8 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 4 Feb 2021 10:17:23 +0300 Subject: [PATCH] [#42] common: Replace Ballot struct's definition to vote.go src file Remove empty ballot.go source file. Signed-off-by: Leonard Lyubich --- common/ballot.go | 12 ------------ common/vote.go | 11 +++++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 common/ballot.go diff --git a/common/ballot.go b/common/ballot.go deleted file mode 100644 index 0abbfd3..0000000 --- a/common/ballot.go +++ /dev/null @@ -1,12 +0,0 @@ -package common - -type Ballot struct { - // ID of the voting decision. - ID []byte - - // Public keys of already voted inner ring nodes. - Voters [][]byte - - // Height of block with the last vote. - Height int -} diff --git a/common/vote.go b/common/vote.go index fa2b9a3..09d410f 100644 --- a/common/vote.go +++ b/common/vote.go @@ -7,6 +7,17 @@ import ( "github.com/nspcc-dev/neo-go/pkg/interop/util" ) +type Ballot struct { + // ID of the voting decision. + ID []byte + + // Public keys of already voted inner ring nodes. + Voters [][]byte + + // Height of block with the last vote. + Height int +} + const voteKey = "ballots" const blockDiff = 20 // change base on performance evaluation