mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-07-25 22:13:12 +00:00
fix/content-type-int (#235)
* fixes * fixes * using a better topic * fix * fixed
This commit is contained in:
@@ -37,7 +37,7 @@ proc runBackground() {.async.} =
|
||||
|
||||
# Publish to a topic
|
||||
let payload = cast[seq[byte]]("hello world")
|
||||
let message = WakuMessage(payload: payload, contentTopic: "foo")
|
||||
let message = WakuMessage(payload: payload, contentTopic: ContentTopic(1))
|
||||
node.publish(topic, message)
|
||||
|
||||
# TODO Await with try/except here
|
||||
|
||||
@@ -3,7 +3,7 @@ when not(compileOption("threads")):
|
||||
|
||||
import std/[tables, strformat, strutils]
|
||||
import confutils, chronicles, chronos, stew/shims/net as stewNet,
|
||||
eth/keys, bearssl
|
||||
eth/keys, bearssl, stew/[byteutils, endians2]
|
||||
import libp2p/[switch, # manage transports, a single entry point for dialing and listening
|
||||
multistream, # tag stream with short header to identify it
|
||||
crypto/crypto, # cryptographic functions
|
||||
@@ -31,7 +31,9 @@ const Help = """
|
||||
"""
|
||||
|
||||
const DefaultTopic = "waku"
|
||||
const DefaultContentTopic = "dingpu"
|
||||
|
||||
const Dingpu = "dingpu".toBytes
|
||||
const DefaultContentTopic = ContentTopic(uint32.fromBytes(Dingpu))
|
||||
|
||||
# XXX Connected is a bit annoying, because incoming connections don't trigger state change
|
||||
# Could poll connection pool or something here, I suppose
|
||||
|
||||
Reference in New Issue
Block a user