From b8605377cd022db5e95210ede6064583331dde01 Mon Sep 17 00:00:00 2001 From: yzang2019 Date: Fri, 29 Mar 2024 16:31:26 +0800 Subject: [PATCH] Add log --- internal/state/execution.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/state/execution.go b/internal/state/execution.go index 7297519c1..7773dfef6 100644 --- a/internal/state/execution.go +++ b/internal/state/execution.go @@ -289,6 +289,7 @@ func (blockExec *BlockExecutor) ApplyBlock( "block_app_hash", fmt.Sprintf("%X", fBlockRes.AppHash), ) + saveStartTime := time.Now() // Save the results before we commit. err = blockExec.store.SaveFinalizeBlockResponses(block.Height, fBlockRes) if err != nil && !errors.Is(err, ErrNoFinalizeBlockResponsesForHeight{block.Height}) { @@ -349,6 +350,7 @@ func (blockExec *BlockExecutor) ApplyBlock( if err := blockExec.store.Save(state); err != nil { return state, err } + fmt.Printf("[Debug] Save block took %s\n", time.Since(saveStartTime)) pruneStartTime := time.Now() // Prune old heights, if requested by ABCI app.