Fix Issue#618

This commit is contained in:
Yukai Tu
2018-03-13 11:53:45 -07:00
parent f4c2b504f4
commit 651e931763
+7 -3
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