fixing hash to bytes conversion and increasing chan sizes (#32)

This commit is contained in:
gabrielmer 2025-02-12 16:20:23 +02:00 committed by GitHub
parent 1187190ee0
commit 46b1648912
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View File

@ -35,5 +35,10 @@ func (h MessageHash) String() string {
}
func (h MessageHash) Bytes() ([]byte, error) {
return hex.DecodeString(string(h))
s := string(h)
// Remove 0x prefix if present
if len(s) >= 2 && s[:2] == "0x" {
s = s[2:]
}
return hex.DecodeString(s)
}

View File

@ -337,9 +337,9 @@ import (
)
const requestTimeout = 30 * time.Second
const MsgChanBufferSize = 100
const TopicHealthChanBufferSize = 100
const ConnectionChangeChanBufferSize = 100
const MsgChanBufferSize = 1024
const TopicHealthChanBufferSize = 1024
const ConnectionChangeChanBufferSize = 1024
type WakuConfig struct {
Host string `json:"host,omitempty"`