From 4af9da40c553e9dc2d91017954320bbab8011074 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 5 Jun 2018 12:55:06 -0700 Subject: [PATCH] htlcswitch: fix alignment in packetQueue for ARM Fixes #1328. --- htlcswitch/queue.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htlcswitch/queue.go b/htlcswitch/queue.go index 36d055b0..be95073f 100644 --- a/htlcswitch/queue.go +++ b/htlcswitch/queue.go @@ -17,6 +17,11 @@ import ( // to signal the number of slots available, and a condition variable to allow // the packetQueue to know when new items have been added to the queue. type packetQueue struct { + // totalHtlcAmt is the sum of the value of all pending HTLC's currently + // residing within the overflow queue. This value should only read or + // modified *atomically*. + totalHtlcAmt int64 + // queueLen is an internal counter that reflects the size of the queue // at any given instance. This value is intended to be use atomically // as this value is used by internal methods to obtain the length of @@ -25,11 +30,6 @@ type packetQueue struct { // with the lock held. queueLen int32 - // totalHtlcAmt is the sum of the value of all pending HTLC's currently - // residing within the overflow queue. This value should only read or - // modified *atomically*. - totalHtlcAmt int64 - queue []*htlcPacket wg sync.WaitGroup