update accordingl to suggestion

This commit is contained in:
darshankabariya 2026-01-08 23:27:46 +05:30
parent 4c6f87e62d
commit 2f6904edd1
No known key found for this signature in database
GPG Key ID: 9A92CCD9899F0D22
5 changed files with 7 additions and 27 deletions

View File

@ -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

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "third_party/nwaku"]
[submodule "vendor/nwaku"]
path = vendor/nwaku
url = https://github.com/logos-messaging/logos-messaging-nim.git

2
go.mod
View File

@ -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

View File

@ -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

View File

@ -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 {