core: log block height before MPT/natives cache initialization

We have this log on the network server side, but it would also be
useful in case of failed blockchain initialization.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2023-11-02 17:29:58 +03:00
parent bbbc6805a8
commit de38163f89

View file

@ -468,6 +468,8 @@ func (bc *Blockchain) init() error {
}
bc.blockHeight = bHeight
bc.persistedHeight = bHeight
bc.log.Debug("initializing caches", zap.Uint32("blockHeight", bHeight))
if err = bc.stateRoot.Init(bHeight); err != nil {
return fmt.Errorf("can't init MPT at height %d: %w", bHeight, err)
}