Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved PB Timestamp index to 10 #861

Merged
merged 2 commits into from
Feb 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions waku/v2/protocol/waku_message.nim
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ proc init*(T: type WakuMessage, buffer: seq[byte]): ProtoResult[T] =
discard ? pb.getField(3, msg.version)

var timestamp: zint64
discard ? pb.getField(4, timestamp)
discard ? pb.getField(10, timestamp)
msg.timestamp = Timestamp(timestamp)

# XXX Experimental, this is part of https://rfc.vac.dev/spec/17/ spec and not yet part of WakuMessage spec
Expand All @@ -65,7 +65,7 @@ proc encode*(message: WakuMessage): ProtoBuffer =
result.write(1, message.payload)
result.write(2, message.contentTopic)
result.write(3, message.version)
result.write(4, zint64(message.timestamp))
result.write(10, zint64(message.timestamp))
when defined(rln):
result.write(21, message.proof.encode())
else:
Expand Down