From 48a1f6f9b38725be4d75eb4f307e90a247793045 Mon Sep 17 00:00:00 2001 From: Alexander Simmerl Date: Wed, 4 Jul 2018 14:59:50 +0200 Subject: [PATCH] state: Format panics --- state/store.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/state/store.go b/state/store.go index 1a75fb33a..9e94e36fa 100644 --- a/state/store.go +++ b/state/store.go @@ -175,8 +175,13 @@ func LoadValidators(db dbm.DB, height int64) (*types.ValidatorSet, error) { if valInfo.ValidatorSet == nil { valInfo2 := loadValidatorsInfo(db, valInfo.LastHeightChanged) if valInfo2 == nil { - panic(fmt.Sprintf(`Couldn't find validators at height %d as - last changed from height %d`, valInfo.LastHeightChanged, height)) + panic( + fmt.Sprintf( + "Couldn't find validators at height %d as last changed from height %d", + valInfo.LastHeightChanged, + height, + ), + ) } valInfo = valInfo2 } @@ -241,8 +246,13 @@ func LoadConsensusParams(db dbm.DB, height int64) (types.ConsensusParams, error) if paramsInfo.ConsensusParams == empty { paramsInfo2 := loadConsensusParamsInfo(db, paramsInfo.LastHeightChanged) if paramsInfo2 == nil { - panic(fmt.Sprintf(`Couldn't find consensus params at height %d as - last changed from height %d`, paramsInfo.LastHeightChanged, height)) + panic( + fmt.Sprintf( + "Couldn't find consensus params at height %d as last changed from height %d", + paramsInfo.LastHeightChanged, + height, + ), + ) } paramsInfo = paramsInfo2 }