Skip to content

Commit 92c8c52

Browse files
committed
Add context to MsgEventListener method
Signed-off-by: Takeshi Arabiki <takeshi.arabiki@datachain.jp>
1 parent 14a3837 commit 92c8c52

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

chains/tendermint/chain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func (c *Chain) sendMsgs(msgs []sdk.Msg) (*sdk.TxResponse, error) {
193193

194194
// call msgEventListener if needed
195195
if c.msgEventListener != nil {
196-
if err := c.msgEventListener.OnSentMsg(msgs); err != nil {
196+
if err := c.msgEventListener.OnSentMsg(context.TODO(), msgs); err != nil {
197197
logger.Error("failed to OnSendMsg call", err)
198198
return res, nil
199199
}

core/chain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ type ChainInfo interface {
113113
// MsgEventListener is a listener that listens a msg send to the chain
114114
type MsgEventListener interface {
115115
// OnSentMsg is a callback functoin that is called when a msg send to the chain
116-
OnSentMsg(msgs []sdk.Msg) error
116+
OnSentMsg(ctx context.Context, msgs []sdk.Msg) error
117117
}
118118

119119
// IBCQuerier is an interface to the state of IBC

0 commit comments

Comments
 (0)