From 08fd6180b2e8fb8c69ce9fbbb3c848f39e51a7f5 Mon Sep 17 00:00:00 2001
From: Roman Khimov <roman@nspcc.ru>
Date: Tue, 11 Aug 2020 20:19:55 +0300
Subject: [PATCH] native: drop validators count structure

It's not used since #1252.
---
 pkg/core/native/validators_count.go | 65 -----------------------------
 1 file changed, 65 deletions(-)
 delete mode 100644 pkg/core/native/validators_count.go

diff --git a/pkg/core/native/validators_count.go b/pkg/core/native/validators_count.go
deleted file mode 100644
index 10a78a072..000000000
--- a/pkg/core/native/validators_count.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package native
-
-import (
-	"errors"
-	"math/big"
-
-	"github.com/nspcc-dev/neo-go/pkg/encoding/bigint"
-	"github.com/nspcc-dev/neo-go/pkg/io"
-)
-
-// MaxValidatorsVoted limits the number of validators that one can vote for.
-const MaxValidatorsVoted = 1024
-
-// ValidatorsCount represents votes with particular number of consensus nodes
-// for this number to be changeable by the voting system.
-type ValidatorsCount [MaxValidatorsVoted]big.Int
-
-// ValidatorsCountFromBytes converts serialized ValidatorsCount to structure.
-func ValidatorsCountFromBytes(b []byte) (*ValidatorsCount, error) {
-	vc := new(ValidatorsCount)
-	if len(b) == 0 {
-		return vc, nil
-	}
-	r := io.NewBinReaderFromBuf(b)
-	vc.DecodeBinary(r)
-
-	if r.Err != nil {
-		return nil, r.Err
-	}
-	return vc, nil
-}
-
-// Bytes returns serialized ValidatorsCount.
-func (vc *ValidatorsCount) Bytes() []byte {
-	w := io.NewBufBinWriter()
-	vc.EncodeBinary(w.BinWriter)
-	if w.Err != nil {
-		panic(w.Err)
-	}
-	return w.Bytes()
-}
-
-// EncodeBinary implements io.Serializable interface.
-func (vc *ValidatorsCount) EncodeBinary(w *io.BinWriter) {
-	w.WriteVarUint(uint64(MaxValidatorsVoted))
-	for i := range vc {
-		w.WriteVarBytes(bigint.ToBytes(&vc[i]))
-	}
-}
-
-// DecodeBinary implements io.Serializable interface.
-func (vc *ValidatorsCount) DecodeBinary(r *io.BinReader) {
-	count := r.ReadVarUint()
-	if count < 0 || count > MaxValidatorsVoted {
-		r.Err = errors.New("invalid validators count")
-		return
-	}
-	for i := 0; i < int(count); i++ {
-		buf := r.ReadVarBytes()
-		if r.Err != nil {
-			return
-		}
-		vc[i] = *bigint.FromBytes(buf)
-	}
-}