Browse Source

rename variable

pull/8151/head
jay tseng 3 years ago
parent
commit
d19e4f289a
No known key found for this signature in database GPG Key ID: 5A9D3063305E6427
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      internal/consensus/replay.go

+ 6
- 6
internal/consensus/replay.go View File

@ -246,14 +246,14 @@ func (h *Handshaker) Handshake(ctx context.Context, appClient abciclient.Client)
return fmt.Errorf("error calling Info: %w", err) return fmt.Errorf("error calling Info: %w", err)
} }
blockHeight := res.LastBlockHeight
if blockHeight < 0 {
return fmt.Errorf("got a negative last block height (%d) from the app", blockHeight)
appBlockHeight := res.LastBlockHeight
if appBlockHeight < 0 {
return fmt.Errorf("got a negative last block height (%d) from the app", appBlockHeight)
} }
appHash := res.LastBlockAppHash appHash := res.LastBlockAppHash
h.logger.Info("ABCI Handshake App Info", h.logger.Info("ABCI Handshake App Info",
"height", blockHeight,
"height", appBlockHeight,
"hash", appHash, "hash", appHash,
"software-version", res.Version, "software-version", res.Version,
"protocol-version", res.AppVersion, "protocol-version", res.AppVersion,
@ -265,13 +265,13 @@ func (h *Handshaker) Handshake(ctx context.Context, appClient abciclient.Client)
} }
// Replay blocks up to the latest in the blockstore. // Replay blocks up to the latest in the blockstore.
_, err = h.ReplayBlocks(ctx, h.initialState, appHash, blockHeight, appClient)
_, err = h.ReplayBlocks(ctx, h.initialState, appHash, appBlockHeight, appClient)
if err != nil { if err != nil {
return fmt.Errorf("error on replay: %w", err) return fmt.Errorf("error on replay: %w", err)
} }
h.logger.Info("Completed ABCI Handshake - Tendermint and App are synced", h.logger.Info("Completed ABCI Handshake - Tendermint and App are synced",
"appHeight", blockHeight, "appHash", appHash)
"appHeight", appBlockHeight, "appHash", appHash)
// TODO: (on restart) replay mempool // TODO: (on restart) replay mempool


Loading…
Cancel
Save