deploy: d49cb53b563c1463d7e39c6ae36abc3868e85967

This commit is contained in:
staheri14 2021-04-07 18:37:10 +00:00
parent aca5deadf9
commit 8ff73e929d
3 changed files with 12 additions and 9 deletions

View File

@ -1 +1 @@
1617404008 1617818926

View File

@ -2,7 +2,7 @@
# libtool - Provide generalized library-building support services. # libtool - Provide generalized library-building support services.
# Generated automatically by config.status (libbacktrace) version-unused # Generated automatically by config.status (libbacktrace) version-unused
# Libtool was configured on host fv-az199-788: # Libtool was configured on host fv-az190-28:
# NOTE: Changes made to this file will be lost: look at ltmain.sh. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
# #
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,

View File

@ -16,11 +16,13 @@ type
payload*: seq[byte] payload*: seq[byte]
contentTopic*: ContentTopic contentTopic*: ContentTopic
version*: uint32 version*: uint32
# the proof field indicates that the message is not a spam
# this field will be used in the rln-relay protocol
proof*: seq[byte]
# sender generated timestamp # sender generated timestamp
timestamp*: float64 timestamp*: float64
# the proof field indicates that the message is not a spam
# this field will be used in the rln-relay protocol
# XXX Experimental, this is part of https://rfc.vac.dev/spec/17/ spec and not yet part of WakuMessage spec
proof*: seq[byte]
# Encoding and decoding ------------------------------------------------------- # Encoding and decoding -------------------------------------------------------
proc init*(T: type WakuMessage, buffer: seq[byte]): ProtoResult[T] = proc init*(T: type WakuMessage, buffer: seq[byte]): ProtoResult[T] =
@ -30,8 +32,9 @@ proc init*(T: type WakuMessage, buffer: seq[byte]): ProtoResult[T] =
discard ? pb.getField(1, msg.payload) discard ? pb.getField(1, msg.payload)
discard ? pb.getField(2, msg.contentTopic) discard ? pb.getField(2, msg.contentTopic)
discard ? pb.getField(3, msg.version) discard ? pb.getField(3, msg.version)
discard ? pb.getField(4, msg.proof) discard ? pb.getField(4, msg.timestamp)
discard ? pb.getField(5, msg.timestamp) # XXX Experimental, this is part of https://rfc.vac.dev/spec/17/ spec and not yet part of WakuMessage spec
discard ? pb.getField(21, msg.proof)
ok(msg) ok(msg)
@ -41,5 +44,5 @@ proc encode*(message: WakuMessage): ProtoBuffer =
result.write(1, message.payload) result.write(1, message.payload)
result.write(2, message.contentTopic) result.write(2, message.contentTopic)
result.write(3, message.version) result.write(3, message.version)
result.write(4, message.proof) result.write(4, message.timestamp)
result.write(5, message.timestamp) result.write(21, message.proof)