Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Commit

Permalink
fix as comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Benzbeeb committed Jun 29, 2020
1 parent edb1cc9 commit 1c77f3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion chain/emitter/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (app *App) EndBlock(req abci.RequestEndBlock) abci.ResponseEndBlock {
}

for _, event := range res.Events {
app.handleEndBlock(event)
app.handleBeginBlockEndBlockEvent(event)
}

app.Write("COMMIT", JsDict{"height": req.Height})
Expand Down
2 changes: 1 addition & 1 deletion chain/emitter/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (app *App) handleMsg(txHash []byte, msg sdk.Msg, log sdk.ABCIMessageLog, ex
}
}

func (app *App) handleEndBlock(event abci.Event) {
func (app *App) handleBeginBlockEndBlockEvent(event abci.Event) {
events := sdk.StringifyEvents([]abci.Event{event})
evMap := parseEvents(events)
switch event.Type {
Expand Down
8 changes: 3 additions & 5 deletions chain/emitter/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,11 @@ func (app *App) handleMsgReportData(
func (app *App) handleEventRequestExecute(evMap EvMap) {
id := types.RequestID(atoi(evMap[types.EventTypeRequestExecute+"."+types.AttributeKeyRequestID][0]))
result := app.OracleKeeper.MustGetResult(app.DeliverContext, id)
resolveStatus := result.ResponsePacketData.ResolveStatus
dict := JsDict{
app.Write("UPDATE_REQUEST", JsDict{
"id": id,
"request_time": result.ResponsePacketData.RequestTime,
"resolve_time": result.ResponsePacketData.ResolveTime,
"resolve_status": resolveStatus,
"resolve_status": result.ResponsePacketData.ResolveStatus,
"result": result.ResponsePacketData.Result,
}
app.Write("UPDATE_REQUEST", dict)
})
}

0 comments on commit 1c77f3b

Please sign in to comment.