proto: change type + a cleanup (#5107)

- drop Height & Base from StatusRequest
It does not make sense nor it's used anywhere currently. Also, there
seem to be no trace of these fields in the ADR-40 (blockchain reactor
v2).

- change PacketMsg#EOF type from int32 to bool
This commit is contained in:
Anton Kaliaev
2020-07-13 14:24:17 +04:00
committed by GitHub
parent 37545bab88
commit 730e16566e
13 changed files with 91 additions and 194 deletions

View File

@@ -98,7 +98,7 @@ func (sio *mockSwitchIo) sendBlockRequest(peerID p2p.ID, height int64) error {
return nil
}
func (sio *mockSwitchIo) sendStatusResponse(base int64, height int64, peerID p2p.ID) error {
func (sio *mockSwitchIo) sendStatusResponse(base, height int64, peerID p2p.ID) error {
sio.mtx.Lock()
defer sio.mtx.Unlock()
sio.numStatusResponse++
@@ -126,7 +126,7 @@ func (sio *mockSwitchIo) trySwitchToConsensus(state sm.State, skipWAL bool) bool
return true
}
func (sio *mockSwitchIo) broadcastStatusRequest(base int64, height int64) error {
func (sio *mockSwitchIo) broadcastStatusRequest() error {
return nil
}