Skip to content

Commit

Permalink
fix: don't ignore duplicate packets
Browse files Browse the repository at this point in the history
They turned out to be the relayer's fault, not ours.
  • Loading branch information
michaelfig committed Jun 3, 2020
1 parent 9a0f87d commit bafac19
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/cosmic-swingset/x/swingset/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,14 @@ func (am AppModule) OnRecvPacket(
// We don't support simulation.
return &sdk.Result{}, nil
}
if packet.GetTimeoutTimestamp() == 0 {
// FIXME: Don't know why, but for every relayed packet, we receive
// a second nearly-identical packet with a zero Timestamp.
return &sdk.Result{}, nil
}

// Sometimes we receive duplicate packets, just with a
// missing packet.TimeoutTimestamp. This causes duplicate
// acks, with one of them being rejected.
//
// This turns out to happen when you run both "rly start"
// and also "rly tx xfer"-- they both are trying to relay
// the same packets.

event := receivePacketEvent{
Type: "IBC_EVENT",
Expand Down

0 comments on commit bafac19

Please sign in to comment.