abci: fix socket client error for state sync responses (#5395)

This caused the node to crash whenever any state sync-related request was called via the ABCI UNIX socket client.
This commit is contained in:
Erik Grinaker
2020-09-24 05:53:15 +02:00
committed by GitHub
parent 9adab8ccc7
commit ebfe0cbb8c
2 changed files with 9 additions and 0 deletions

View File

@@ -51,3 +51,4 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi
- [store] \#5382 Fix race conditions when loading/saving/pruning blocks (@erikgrinaker)
- [light] [\#5307](https://github.com/tendermint/tendermint/pull/5307) Persist correct proposer priority in light client validator sets (@cmwaters)
- [docker] \#5385 Fix incorrect `time_iota_ms` default setting causing block timestamp drift (@erikgrinaker)
- [abci] \#5395 Fix socket client error for state sync responses (@erikgrinaker)

View File

@@ -486,6 +486,14 @@ func resMatchesReq(req *types.Request, res *types.Response) (ok bool) {
_, ok = res.Value.(*types.Response_BeginBlock)
case *types.Request_EndBlock:
_, ok = res.Value.(*types.Response_EndBlock)
case *types.Request_ApplySnapshotChunk:
_, ok = res.Value.(*types.Response_ApplySnapshotChunk)
case *types.Request_LoadSnapshotChunk:
_, ok = res.Value.(*types.Response_LoadSnapshotChunk)
case *types.Request_ListSnapshots:
_, ok = res.Value.(*types.Response_ListSnapshots)
case *types.Request_OfferSnapshot:
_, ok = res.Value.(*types.Response_OfferSnapshot)
}
return ok
}