Skip to main content

Module notify

Module notify 

Source
Expand description

A task that runs an external command whenever the best chain tip changes.

This is Zebra’s port of zcashd’s -blocknotify. Whenever the node’s best chain tip changes, and the node is close to the network tip (Zebra’s analogue of “not in initial block download”), the configured command is run via the system shell with every %s replaced by the new tip’s block hash. The command is run detached and never blocks block validation.

Structs§

Config
Block notify configuration section.

Enums§

BlockNotifyError
Errors that can occur in the block notify task.

Functions§

render_command 🔒
Replaces every %s in command with hash in getbestblockhash hex format.
run_block_notify
Run continuously, executing command whenever the best chain tip changes.
spawn_notify_command 🔒
Renders command for hash and spawns it detached via the system shell.