You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change functions in testing/event.go to use []abci.Event instead of sdk.Events
Problem Definition
In v0.47 SDK, SendMsgs() will end up calling SimDeliver which has access to sdk.Result which has sdk.Events because of this conversion
In v0.50, begin block, deliver tx, and end block are combined into FinalizeBlock which returns a ResponseFinalizeBlock which contains []abci.ExecTxResult. These tx results will contain []abci.Event instead of sdk.Events
Instead of converting []abci.Event into sdk.Events, we should pass around []abci.Event (SendMsgs will also be updated to return a abci.ExecTxResult instead of sdk.Result (but this will occur with the SDK bump)
Proposal
Change functions in testing/event.go to use []abci.Event instead of sdk.Events
Just for clarity, this is not in any way affected if we moved to typed events, correct? Typed or not typed, we'll still be getting an array of abci.Event from SendMsgs.
I think that's correct. By typed events you mean creating a type per event type. For example:
typeCreateClientEventstruct {}
?
In this situation, indeed FinalizeBlock will still return us a abci.Event as the typed event would only be typed until we emit it. There was discussion a couple years ago to add typed events to the SDK, but it was partially implemented and I'm not sure if it is used today.
ah, typed events in the way the SDK defined them was what I was referring to. Missing the fact that they aren't really used, there's an old issue you opened on this which might need to be re-examined #54 (and possibly closed)
Summary
Change functions in
testing/event.go
to use[]abci.Event
instead ofsdk.Events
Problem Definition
In v0.47 SDK,
SendMsgs()
will end up callingSimDeliver
which has access tosdk.Result
which hassdk.Events
because of this conversionIn v0.50, begin block, deliver tx, and end block are combined into
FinalizeBlock
which returns aResponseFinalizeBlock
which contains[]abci.ExecTxResult
. These tx results will contain[]abci.Event
instead ofsdk.Events
Instead of converting
[]abci.Event
intosdk.Events
, we should pass around[]abci.Event
(SendMsgs will also be updated to return aabci.ExecTxResult
instead ofsdk.Result
(but this will occur with the SDK bump)Proposal
Change functions in
testing/event.go
to use[]abci.Event
instead ofsdk.Events
Thanks @alpe for the reference fix
For Admin Use
The text was updated successfully, but these errors were encountered: