[#265] innerring: Select containers to audit

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-12-18 15:52:27 +03:00 committed by Alex Vanin
parent 87e1252065
commit 3d3d058b05
8 changed files with 263 additions and 11 deletions

View file

@ -28,6 +28,12 @@ func (s *Server) Index() int32 {
return s.innerRingIndex.Load()
}
// InnerRingSize is a getter for a global size of inner ring list. This value
// paired with inner ring index.
func (s *Server) InnerRingSize() int32 {
return s.innerRingSize.Load()
}
func (s *Server) voteForSidechainValidator(validators []keys.PublicKey) error {
index := s.Index()
if index < 0 || index >= alphabetContractsN {