-w, --watch=false: After listing/getting the requested block or operation, watch for changes.
Examples;
tez block head
will print the latest head block, and exit
tez block head --watch
or
tez block head -w
Should not detach from the terminal, but instead will wait for the next block from head, and print it. Continuing until it gets SIGINT from the users terminal.
We can extend this to operations and kinds
tez block operations head --kind tx,ballot -w
would print transactions and ballots to the console as they are received.
https://github.com/ecadlabs/tezos-bot has an implementation that listens on the monitor head endpoint and filters for specific operations. Inspiration can be taken from that implementation for this feature.
Add a global option;
-w, --watch=false: After listing/getting the requested block or operation, watch for changes.
Examples;
tez block head
will print the latest head block, and exittez block head --watch
ortez block head -w
Should not detach from the terminal, but instead will wait for the next block from head, and print it. Continuing until it gets
SIGINT
from the users terminal.We can extend this to operations and kinds
tez block operations head --kind tx,ballot -w
would printtransactions
andballots
to the console as they are received.