Skip to content

Commit

Permalink
fix: use get packet receipt for has query receipt (icon-project#163)
Browse files Browse the repository at this point in the history
Co-authored-by: izyak <izyak@mail.co>
  • Loading branch information
izyak and izyak committed Sep 7, 2023
1 parent b3370a5 commit ac32650
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion relayer/chains/icon/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const (

MethodGetPacketCommitment = "getPacketCommitment"
MethodGetPacketAcknowledgementCommitment = "getPacketAcknowledgementCommitment"
MethodHasPacketReceipt = "hasPacketReceipt"
MethodGetPacketReceipt = "getPacketReceipt"
MethodGetNextSequenceReceive = "getNextSequenceReceive"
MethodGetNextSequenceSend = "getNextSequenceSend"
Expand Down
4 changes: 2 additions & 2 deletions relayer/chains/icon/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -764,14 +764,14 @@ func (icp *IconProvider) QueryPacketAcknowledgement(ctx context.Context, height
}

func (icp *IconProvider) QueryPacketReceipt(ctx context.Context, height int64, channelid, portid string, seq uint64) (recRes *chantypes.QueryPacketReceiptResponse, err error) {
callParam := icp.prepareCallParams(MethodHasPacketReceipt, map[string]interface{}{
callParam := icp.prepareCallParams(MethodGetPacketReceipt, map[string]interface{}{
"portId": portid,
"channelId": channelid,
"sequence": types.NewHexInt(int64(seq)),
})
var packetReceiptHexByte types.HexInt
if err := icp.client.Call(callParam, &packetReceiptHexByte); err != nil {
return nil, err
packetReceiptHexByte = types.NewHexInt(0)
}
packetReceipt, err := packetReceiptHexByte.Value()
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion relayer/chains/icon/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,8 @@ func (icp *IconProvider) SendMessagesToMempool(
if msg != nil {
err := icp.SendIconTransaction(ctx, msg, asyncCtx, asyncCallback)
if err != nil {
return err
icp.log.Warn("Send Icon Transaction Error", zap.String("method", msg.Type()), zap.Error(err))
continue
}
}
}
Expand Down

0 comments on commit ac32650

Please sign in to comment.