mirror of
https://github.com/tendermint/tendermint.git
synced 2026-07-31 12:32:54 +00:00
abci: implement finalize block (#9468)
Adds the `FinalizeBlock` method which replaces `BeginBlock`, `DeliverTx`, and `EndBlock` in a single call.
This commit is contained in:
+1
-1
@@ -171,7 +171,7 @@ func NewNode(config *cfg.Config,
|
||||
// EventBus and IndexerService must be started before the handshake because
|
||||
// we might need to index the txs of the replayed block as this might not have happened
|
||||
// when the node stopped last time (i.e. the node stopped after it saved the block
|
||||
// but before it indexed the txs, or, endblocker panicked)
|
||||
// but before it indexed the txs)
|
||||
eventBus, err := createAndStartEventBus(logger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
+3
-3
@@ -125,7 +125,7 @@ func TestNodeSetAppVersion(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
// default config uses the kvstore app
|
||||
var appVersion = kvstore.ProtocolVersion
|
||||
var appVersion = kvstore.AppVersion
|
||||
|
||||
// check version is set in state
|
||||
state, err := n.stateStore.Load()
|
||||
@@ -250,7 +250,7 @@ func testFreeAddr(t *testing.T) string {
|
||||
func TestCreateProposalBlock(t *testing.T) {
|
||||
config := test.ResetTestRoot("node_create_proposal")
|
||||
defer os.RemoveAll(config.RootDir)
|
||||
cc := proxy.NewLocalClientCreator(kvstore.NewApplication())
|
||||
cc := proxy.NewLocalClientCreator(kvstore.NewInMemoryApplication())
|
||||
proxyApp := proxy.NewAppConns(cc, proxy.NopMetrics())
|
||||
err := proxyApp.Start()
|
||||
require.Nil(t, err)
|
||||
@@ -362,7 +362,7 @@ func TestCreateProposalBlock(t *testing.T) {
|
||||
func TestMaxProposalBlockSize(t *testing.T) {
|
||||
config := test.ResetTestRoot("node_create_proposal")
|
||||
defer os.RemoveAll(config.RootDir)
|
||||
cc := proxy.NewLocalClientCreator(kvstore.NewApplication())
|
||||
cc := proxy.NewLocalClientCreator(kvstore.NewInMemoryApplication())
|
||||
proxyApp := proxy.NewAppConns(cc, proxy.NopMetrics())
|
||||
err := proxyApp.Start()
|
||||
require.Nil(t, err)
|
||||
|
||||
+2
-2
@@ -413,7 +413,7 @@ func createTransport(
|
||||
connFilters,
|
||||
// ABCI query for address filtering.
|
||||
func(_ p2p.ConnSet, c net.Conn, _ []net.IP) error {
|
||||
res, err := proxyApp.Query().QuerySync(abci.RequestQuery{
|
||||
res, err := proxyApp.Query().Query(context.TODO(), &abci.RequestQuery{
|
||||
Path: fmt.Sprintf("/p2p/filter/addr/%s", c.RemoteAddr().String()),
|
||||
})
|
||||
if err != nil {
|
||||
@@ -431,7 +431,7 @@ func createTransport(
|
||||
peerFilters,
|
||||
// ABCI query for ID filtering.
|
||||
func(_ p2p.IPeerSet, p p2p.Peer) error {
|
||||
res, err := proxyApp.Query().QuerySync(abci.RequestQuery{
|
||||
res, err := proxyApp.Query().Query(context.TODO(), &abci.RequestQuery{
|
||||
Path: fmt.Sprintf("/p2p/filter/id/%s", p.ID()),
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user