diff --git a/golang/cosmos/vm/height.go b/golang/cosmos/vm/height.go index ad5d2e3f18e..c76fd8bede3 100644 --- a/golang/cosmos/vm/height.go +++ b/golang/cosmos/vm/height.go @@ -8,6 +8,11 @@ var committedHeight int64 = 0 // IsSimulation tells if we are simulating the transaction func IsSimulation(ctx sdk.Context) bool { + // If we haven't committed yet, we're still in bootstrap. + if committedHeight == 0 { + return false + } + // Otherwise, if we already committed this block, we're in simulation. return committedHeight == ctx.BlockHeight() }