From f535990da5e65bebf54fb8bb4695d1dba0b6aad9 Mon Sep 17 00:00:00 2001 From: sukun Date: Thu, 22 Aug 2024 02:12:36 +0530 Subject: [PATCH] ci: use go1.23, drop go1.21 (#2933) --- .github/workflows/go-test.yml | 2 +- p2p/net/nat/nat_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 2ae84343f..66cacd992 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -17,6 +17,6 @@ jobs: go-test: uses: ./.github/workflows/go-test-template.yml with: - go-versions: '["1.21.x", "1.22.x"]' + go-versions: '["1.22.x", "1.23.x"]' secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/p2p/net/nat/nat_test.go b/p2p/net/nat/nat_test.go index 50e1eb3a2..772c876c7 100644 --- a/p2p/net/nat/nat_test.go +++ b/p2p/net/nat/nat_test.go @@ -45,7 +45,8 @@ func TestAddMapping(t *testing.T) { require.False(t, found, "didn't expect a port mapping for unmapped protocol") mapped, found := nat.GetMapping("tcp", 10000) require.True(t, found, "expected port mapping") - require.Equal(t, netip.AddrPortFrom(netip.AddrFrom4([4]byte{1, 2, 3, 4}), 1234), mapped) + addr, _ := netip.AddrFromSlice(net.IPv4(1, 2, 3, 4)) + require.Equal(t, netip.AddrPortFrom(addr, 1234), mapped) } func TestRemoveMapping(t *testing.T) {