onomyprotocol / arc

Arc moves assets cross-chain to and from integrated blockchains.
Apache License 2.0
3 stars 10 forks source link

Emit events erased by the CacheContext #54

Closed dzmitryhil closed 2 years ago

dzmitryhil commented 2 years ago

The "processAttestation" function contains code where it generates new context by "xCtx, commit := ctx.CacheContext()" and then uses "xCtx" for the "k.AttestationHandler.Handle" to generate a new Tx. The "k.AttestationHandler.Handle" fill the context with the Events during the execution, and then the "processAttestation" commits the state but events that were added to the "xCtx" are not moved to the "ctx" which is used later to get the events.

This PR contains the fix for that issue.