Browse Source

behaviour: add simple doc.go (#5055)

## Description

add a simple doc.go to behavior module

Closes: #XXX
pull/5062/head
Marko 4 years ago
committed by GitHub
parent
commit
dab488b118
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 0 deletions
  1. +42
    -0
      behaviour/doc.go

+ 42
- 0
behaviour/doc.go View File

@ -0,0 +1,42 @@
/*
Package Behaviour provides a mechanism for reactors to report behaviour of peers.
Instead of a reactor calling the switch directly it will call the behaviour module which will
handle the stoping and marking peer as good on behalf of the reactor.
There are four different behaviours a reactor can report.
1. bad message
type badMessage struct {
explanation string
}
This message will request the peer be stopped for an error
2. message out of order
type messageOutOfOrder struct {
explanation string
}
This message will request the peer be stopped for an error
3. consesnsus Vote
type consensusVote struct {
explanation string
}
This message will request the peer be marked as good
4. block part
type blockPart struct {
explanation string
}
This message will request the peer be marked as good
*/
package behaviour

Loading…
Cancel
Save