You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
362 B

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