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.

42 lines
831 B

  1. /*
  2. Package Behavior provides a mechanism for reactors to report behavior of peers.
  3. Instead of a reactor calling the switch directly it will call the behavior module which will
  4. handle the stoping and marking peer as good on behalf of the reactor.
  5. There are four different behaviors a reactor can report.
  6. 1. bad message
  7. type badMessage struct {
  8. explanation string
  9. }
  10. This message will request the peer be stopped for an error
  11. 2. message out of order
  12. type messageOutOfOrder struct {
  13. explanation string
  14. }
  15. This message will request the peer be stopped for an error
  16. 3. consesnsus Vote
  17. type consensusVote struct {
  18. explanation string
  19. }
  20. This message will request the peer be marked as good
  21. 4. block part
  22. type blockPart struct {
  23. explanation string
  24. }
  25. This message will request the peer be marked as good
  26. */
  27. package behavior