From 2f6904edd1ccc38705c28d3f1d6ac4645d38b741 Mon Sep 17 00:00:00 2001 From: darshankabariya Date: Thu, 8 Jan 2026 23:27:46 +0530 Subject: [PATCH] update accordingl to suggestion --- .../workflows/Repeated_tests_endurancce.yml | 2 +- .gitmodules | 2 +- go.mod | 2 +- waku/Makefile | 2 +- waku/utils/utils.go | 26 +++---------------- 5 files changed, 7 insertions(+), 27 deletions(-) diff --git a/.github/workflows/Repeated_tests_endurancce.yml b/.github/workflows/Repeated_tests_endurancce.yml index 27bf3ef..2ad7e31 100644 --- a/.github/workflows/Repeated_tests_endurancce.yml +++ b/.github/workflows/Repeated_tests_endurancce.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.24" - name: Install Go dependencies run: go mod download diff --git a/.gitmodules b/.gitmodules index 7b76ddf..fdd82ee 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "third_party/nwaku"] +[submodule "vendor/nwaku"] path = vendor/nwaku url = https://github.com/logos-messaging/logos-messaging-nim.git diff --git a/go.mod b/go.mod index dac0859..9f3c4a8 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/logos-messaging/logos-messaging-go-bindings -go 1.23.0 +go 1.24.0 replace github.com/ethereum/go-ethereum v1.10.26 => github.com/status-im/go-ethereum v1.10.25-status.18 diff --git a/waku/Makefile b/waku/Makefile index cc764d1..4011a6f 100644 --- a/waku/Makefile +++ b/waku/Makefile @@ -51,7 +51,7 @@ check-folders: fi build: - @echo "Building Waku Go Bindings (manual)..." + @echo "Building Logos Messaging Go Bindings (manual)..." CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -o waku-bindings . test: build diff --git a/waku/utils/utils.go b/waku/utils/utils.go index edd8258..4445006 100644 --- a/waku/utils/utils.go +++ b/waku/utils/utils.go @@ -1,8 +1,6 @@ package utils import ( - "fmt" - "os" "runtime" "github.com/libp2p/go-libp2p/core/peer" @@ -10,27 +8,9 @@ import ( ) func GetRSSKB() (uint64, error) { - var m runtime.MemStats - runtime.ReadMemStats(&m) - - if runtime.GOOS == "linux" { - data, err := os.ReadFile("/proc/self/status") - if err != nil { - return 0, err - } - - var rss uint64 - for _, line := range []byte(string(data)) { - if line == 0 { - break - } - } - if _, err := fmt.Sscanf(string(data), "VmRSS: %d kB", &rss); err == nil { - return rss, nil - } - } - - return m.Sys / 1024, nil + var m runtime.MemStats + runtime.ReadMemStats(&m) + return m.Sys / 1024, nil } func EncapsulatePeerID(p peer.ID, addrs ...multiaddr.Multiaddr) []multiaddr.Multiaddr {