github.com/number571/tendermint@v0.34.11-gost/internal/p2p/p2ptest/util.go (about)

     1  package p2ptest
     2  
     3  import (
     4  	"github.com/number571/tendermint/types"
     5  	gogotypes "github.com/gogo/protobuf/types"
     6  )
     7  
     8  // Message is a simple message containing a string-typed Value field.
     9  type Message = gogotypes.StringValue
    10  
    11  func NodeInSlice(id types.NodeID, ids []types.NodeID) bool {
    12  	for _, n := range ids {
    13  		if id == n {
    14  			return true
    15  		}
    16  	}
    17  	return false
    18  }