Skip to content

Question about "bitcoincore_zmq::Message::Tx" #15

Answered by antonilol
kkthmyh asked this question in Q&A
Discussion options

You must be logged in to vote

I wrote some documentation on that, but it is on the sequence method of Message (see docs here).

This number is in Bitcoin Core for each zmq publisher, it is defined as uint32_t, and incremented every time a zmq message is sent, without additional special logic, so after u32::MAX it rolls over back to 0.

This number can be used to track if any messages are lost. Lets say you have to restart your program (but not bitcoin core), if the program records the last seen sequence number before restarting it can compare it to the first seen one after booting up, and know if and how many messages were missed.

If you need more info on Bitcoin Core zmq specifics like this, I linked some documentation…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by antonilol
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #14 on May 03, 2024 19:33.