github.com/MetalBlockchain/metalgo@v1.11.9/vms/proposervm/proposer/validators.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package proposer
     5  
     6  import (
     7  	"github.com/MetalBlockchain/metalgo/ids"
     8  	"github.com/MetalBlockchain/metalgo/utils"
     9  )
    10  
    11  var _ utils.Sortable[validatorData] = validatorData{}
    12  
    13  type validatorData struct {
    14  	id     ids.NodeID
    15  	weight uint64
    16  }
    17  
    18  func (d validatorData) Compare(other validatorData) int {
    19  	return d.id.Compare(other.id)
    20  }