mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-18 23:05:03 +00:00
Fix mock reporter interface (#4081)
+ MockReporeter.Report should return an error to adhere to the
`behaviour.Reporter` interface
This commit is contained in:
@@ -63,10 +63,12 @@ func NewMockReporter() *MockReporter {
|
||||
}
|
||||
|
||||
// Report stores the PeerBehaviour produced by the peer identified by peerID.
|
||||
func (mpbr *MockReporter) Report(behaviour PeerBehaviour) {
|
||||
func (mpbr *MockReporter) Report(behaviour PeerBehaviour) error {
|
||||
mpbr.mtx.Lock()
|
||||
defer mpbr.mtx.Unlock()
|
||||
mpbr.pb[behaviour.peerID] = append(mpbr.pb[behaviour.peerID], behaviour)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetBehaviours returns all behaviours reported on the peer identified by peerID.
|
||||
|
||||
Reference in New Issue
Block a user