Merge pull request #619 from lino-network/bugfix

Fix Issue#618
This commit is contained in:
Rigel 2018-03-14 16:05:59 +01:00 committed by GitHub
commit 7627323c93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -371,6 +371,13 @@ func (app *BaseApp) runTx(isCheckTx bool, txBytes []byte, tx sdk.Tx) (result sdk
}
}
// Match route.
msgType := msg.Type()
handler := app.router.Route(msgType)
if handler == nil {
return sdk.ErrUnknownRequest("Unrecognized Msg type: " + msgType).Result()
}
// Get the correct cache
var msCache sdk.CacheMultiStore
if isCheckTx == true {
@ -384,9 +391,6 @@ func (app *BaseApp) runTx(isCheckTx bool, txBytes []byte, tx sdk.Tx) (result sdk
}
// Match and run route.
msgType := msg.Type()
handler := app.router.Route(msgType)
result = handler(ctx, msg)
// If result was successful, write to app.checkState.ms or app.deliverState.ms