From 09ad29c0776bef30f67b93f031f6ea7c8e417799 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 29 Apr 2021 20:47:26 -0700 Subject: [PATCH] fix: fix alignment of stats struct in virtual network This needs to be at the top of the "allocated" struct. Otherwise, 32bit tests fail. --- testnet/virtual.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testnet/virtual.go b/testnet/virtual.go index c44b430..48ef7b4 100644 --- a/testnet/virtual.go +++ b/testnet/virtual.go @@ -184,11 +184,13 @@ func (n *network) SendMessage( } type networkClient struct { + // These need to be at the top of the struct (allocated on the heap) for alignment on 32bit platforms. + stats bsnet.Stats + local peer.ID bsnet.Receiver network *network routing routing.Routing - stats bsnet.Stats supportedProtocols []protocol.ID } -- GitLab