From 524906478ab5f906b772218a4b3954cb35f551ff Mon Sep 17 00:00:00 2001 From: rigelrozanski Date: Wed, 14 Nov 2018 14:16:52 -0500 Subject: [PATCH] add init chain block gas for gen-txs (all unit tests fixed) --- baseapp/baseapp.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 5e3624bb7d..7e35fb5f6e 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -262,6 +262,11 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC if app.initChainer == nil { return } + + // add block gas meter for any genesis transactions (allow infinite gas) + app.deliverState.ctx = app.deliverState.ctx. + WithBlockGasMeter(sdk.NewInfiniteGasMeter()) + res = app.initChainer(app.deliverState.ctx, req) // NOTE: we don't commit, but BeginBlock for block 1