Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renames AddPacket, AddAck methods in simibc utils #479

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/difference/core/driver/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (s *CoreSuite) consumerSlash(val sdk.ConsAddress, h int64, isDowntime bool)
if e.Type == channeltypes.EventTypeSendPacket {
packet, err := channelkeeper.ReconstructPacketFromEvent(e)
s.Require().NoError(err)
s.simibc.Link.AddPacket(s.chainID(C), packet)
s.simibc.Link.AddOutboundPacket(s.chainID(C), packet)
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions tests/difference/core/driver/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ func (b *Builder) sendEmptyVSCPacketToFinishHandshake() {

ack, err := simibc.TryRecvPacket(b.endpoint(P), b.endpoint(C), packet)

b.link.AddAck(b.chainID(C), ack, packet)
b.link.AddOutboundAck(b.chainID(C), ack, packet)

b.suite.Require().NoError(err)
}
Expand Down Expand Up @@ -618,7 +618,7 @@ func (b *Builder) deliver(chainID string) {
if err != nil {
b.coordinator.Fatal("deliver")
}
b.link.AddAck(chainID, ack, p.Packet)
b.link.AddOutboundAck(chainID, ack, p.Packet)
}
}

Expand Down Expand Up @@ -650,7 +650,7 @@ func (b *Builder) endBlock(chainID string) {
if e.Type == channeltypes.EventTypeSendPacket {
packet, _ := channelkeeper.ReconstructPacketFromEvent(e)
// Collect packets
b.link.AddPacket(chainID, packet)
b.link.AddOutboundPacket(chainID, packet)
}
}

Expand Down
8 changes: 4 additions & 4 deletions testutil/simibc/ordered_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ func MakeOrderedLink() OrderedLink {
}
}

// AddPacket adds an outbound packet from the sender to the counterparty.
func (n OrderedLink) AddPacket(sender string, packet channeltypes.Packet) {
// AddOutboundPacket adds an outbound packet from the sender to the counterparty.
func (n OrderedLink) AddOutboundPacket(sender string, packet channeltypes.Packet) {
n.OutboxPackets[sender] = append(n.OutboxPackets[sender], Packet{packet, 0})
}

// AddAck adds an outbound ack, for future delivery to the sender of the packet
// AddOutboundAck adds an outbound ack, for future delivery to the sender of the packet
// being acked.
func (n OrderedLink) AddAck(sender string, ack []byte, packet channeltypes.Packet) {
func (n OrderedLink) AddOutboundAck(sender string, ack []byte, packet channeltypes.Packet) {
n.OutboxAcks[sender] = append(n.OutboxAcks[sender], Ack{ack, packet, 0})
}

Expand Down
4 changes: 2 additions & 2 deletions testutil/simibc/relayed_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (f *RelayedPath) DeliverPackets(chainID string, num int) {
if err != nil {
f.t.Fatal("deliver")
}
f.Link.AddAck(chainID, ack, p.Packet)
f.Link.AddOutboundAck(chainID, ack, p.Packet)
}
}

Expand Down Expand Up @@ -112,7 +112,7 @@ func (f *RelayedPath) EndAndBeginBlock(chainID string, dt time.Duration, preComm
if e.Type == channeltypes.EventTypeSendPacket {
packet, _ := channelkeeper.ReconstructPacketFromEvent(e)
// Collect packets
f.Link.AddPacket(chainID, packet)
f.Link.AddOutboundPacket(chainID, packet)
}
}

Expand Down