fixing hash to bytes conversion and increasing chan sizes

This commit is contained in:
Gabriel mermelstein 2025-02-12 15:52:05 +02:00
parent 167e3e7add
commit e4557c64f4
No known key found for this signature in database
GPG Key ID: 82B8134785FEAE0D
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"`