htlcswitch: Remove obsolete fields from htlcPacket.

This commit is contained in:
Jim Posen
2017-10-30 12:21:07 -07:00
committed by Olaoluwa Osuntokun
parent 40fb0ddcfc
commit 6ea533275c
6 changed files with 22 additions and 40 deletions

View File

@@ -20,12 +20,12 @@ func TestWaitingQueueThreadSafety(t *testing.T) {
q.Start()
defer q.Stop()
a := make([]lnwire.MilliSatoshi, numPkts)
a := make([]uint64, numPkts)
for i := 0; i < numPkts; i++ {
a[i] = lnwire.MilliSatoshi(i)
a[i] = uint64(i)
q.AddPkt(&htlcPacket{
amount: lnwire.MilliSatoshi(i),
htlc: &lnwire.UpdateAddHTLC{},
incomingHTLCID: a[i],
htlc: &lnwire.UpdateAddHTLC{},
})
}
@@ -37,13 +37,13 @@ func TestWaitingQueueThreadSafety(t *testing.T) {
queueLength)
}
var b []lnwire.MilliSatoshi
var b []uint64
for i := 0; i < numPkts; i++ {
q.SignalFreeSlot()
select {
case packet := <-q.outgoingPkts:
b = append(b, packet.amount)
b = append(b, packet.incomingHTLCID)
case <-time.After(2 * time.Second):
t.Fatal("timeout")