mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-21 07:24:36 +00:00
fix some tests
This commit is contained in:
+3
-11
@@ -407,8 +407,8 @@ func (c *Client) BlockResults(ctx context.Context, height *int64) (*ctypes.Resul
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// proto-encode BeginBlock events
|
||||
bbeBytes, err := proto.Marshal(&abci.ResponseBeginBlock{
|
||||
// proto-encode FinalizeBlock events
|
||||
bbeBytes, err := proto.Marshal(&abci.ResponseFinalizeBlock{
|
||||
Events: res.BeginBlockEvents,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -418,16 +418,8 @@ func (c *Client) BlockResults(ctx context.Context, height *int64) (*ctypes.Resul
|
||||
// Build a Merkle tree of proto-encoded DeliverTx results and get a hash.
|
||||
results := types.NewResults(res.TxsResults)
|
||||
|
||||
// proto-encode EndBlock events.
|
||||
ebeBytes, err := proto.Marshal(&abci.ResponseEndBlock{
|
||||
Events: res.EndBlockEvents,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Build a Merkle tree out of the above 3 binary slices.
|
||||
rH := merkle.HashFromByteSlices([][]byte{bbeBytes, results.Hash(), ebeBytes})
|
||||
rH := merkle.HashFromByteSlices([][]byte{bbeBytes, results.Hash()})
|
||||
|
||||
// Verify block results.
|
||||
if !bytes.Equal(rH, trustedBlock.LastResultsHash) {
|
||||
|
||||
Reference in New Issue
Block a user