state: proto migration (#4951)

This commit is contained in:
Marko
2020-06-05 10:47:16 +02:00
committed by GitHub
parent ee91312d34
commit b9af87c4ea
45 changed files with 5222 additions and 1471 deletions
+7 -2
View File
@@ -1,6 +1,7 @@
package state
import (
"errors"
"fmt"
"time"
@@ -279,9 +280,13 @@ func execBlockOnProxyApp(
// Begin block
var err error
pbh := block.Header.ToProto()
if pbh == nil {
return nil, errors.New("nil header")
}
abciResponses.BeginBlock, err = proxyAppConn.BeginBlockSync(abci.RequestBeginBlock{
Hash: block.Hash(),
Header: types.TM2PB.Header(&block.Header),
Header: *pbh,
LastCommitInfo: commitInfo,
ByzantineValidators: byzVals,
})
@@ -466,7 +471,7 @@ func fireEvents(
})
for i, tx := range block.Data.Txs {
eventBus.PublishEventTx(types.EventDataTx{TxResult: types.TxResult{
eventBus.PublishEventTx(types.EventDataTx{TxResult: abci.TxResult{
Height: block.Height,
Index: uint32(i),
Tx: tx,