From ff6fbe9e805ad5c18a76e22983fd99ea05d290f4 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Mon, 29 Jan 2018 13:55:28 +0100 Subject: [PATCH] Expose NewContext, so I can initialize accounts --- baseapp/baseapp.go | 2 +- baseapp/context.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index fb952039c..1727c2a42 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -298,7 +298,7 @@ func (app *BaseApp) runTx(isCheckTx bool, txBytes []byte, tx sdk.Tx) (result sdk } // Construct a Context. - var ctx = app.newContext(isCheckTx, txBytes) + var ctx = app.NewContext(isCheckTx, txBytes) // TODO: override default ante handler w/ custom ante handler. diff --git a/baseapp/context.go b/baseapp/context.go index cbed01cbd..281220665 100644 --- a/baseapp/context.go +++ b/baseapp/context.go @@ -2,10 +2,10 @@ package baseapp import sdk "github.com/cosmos/cosmos-sdk/types" -// Returns a new Context suitable for AnteHandler (and indirectly Handler) processing. +// NewContext returns a new Context suitable for AnteHandler (and indirectly Handler) processing. // NOTE: txBytes may be nil to support TestApp.RunCheckTx // and TestApp.RunDeliverTx. -func (app *BaseApp) newContext(isCheckTx bool, txBytes []byte) sdk.Context { +func (app *BaseApp) NewContext(isCheckTx bool, txBytes []byte) sdk.Context { var store sdk.MultiStore if isCheckTx { store = app.msCheck