Merge remote-tracking branch 'origin' into wb/abci-process-proposal-synchronize

This commit is contained in:
William Banfield
2022-02-22 16:04:37 -05:00
492 changed files with 65490 additions and 4079 deletions
+14 -11
View File
@@ -145,24 +145,27 @@ func (app *Application) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx {
return abci.ResponseCheckTx{Code: code.CodeTypeOK, GasWanted: 1}
}
// DeliverTx implements ABCI.
func (app *Application) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx {
key, value, err := parseTx(req.Tx)
if err != nil {
panic(err) // shouldn't happen since we verified it in CheckTx
// FinalizeBlock implements ABCI.
func (app *Application) FinalizeBlock(req abci.RequestFinalizeBlock) abci.ResponseFinalizeBlock {
var txs = make([]*abci.ResponseDeliverTx, len(req.Txs))
for i, tx := range req.Txs {
key, value, err := parseTx(tx)
if err != nil {
panic(err) // shouldn't happen since we verified it in CheckTx
}
app.state.Set(key, value)
txs[i] = &abci.ResponseDeliverTx{Code: code.CodeTypeOK}
}
app.state.Set(key, value)
return abci.ResponseDeliverTx{Code: code.CodeTypeOK}
}
// EndBlock implements ABCI.
func (app *Application) EndBlock(req abci.RequestEndBlock) abci.ResponseEndBlock {
valUpdates, err := app.validatorUpdates(uint64(req.Height))
if err != nil {
panic(err)
}
return abci.ResponseEndBlock{
return abci.ResponseFinalizeBlock{
Txs: txs,
ValidatorUpdates: valUpdates,
Events: []abci.Event{
{
+1
View File
@@ -6,6 +6,7 @@ import (
"testing"
"github.com/stretchr/testify/require"
e2e "github.com/tendermint/tendermint/test/e2e/pkg"
)
+1
View File
@@ -7,6 +7,7 @@ import (
"testing"
"github.com/stretchr/testify/require"
mempool "github.com/tendermint/tendermint/test/fuzz/mempool"
)
@@ -7,6 +7,7 @@ import (
"testing"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/test/fuzz/p2p/secretconnection"
)
@@ -7,6 +7,7 @@ import (
"testing"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/test/fuzz/rpc/jsonrpc/server"
)