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

Notifications from -blocknotify=<cmd> ought to dedupe blocks #5

Open
kseistrup opened this issue Oct 19, 2019 · 0 comments
Open

Notifications from -blocknotify=<cmd> ought to dedupe blocks #5

kseistrup opened this issue Oct 19, 2019 · 0 comments

Comments

@kseistrup
Copy link

bitcannad --help says:

-blocknotify=<cmd>     Execute command when the best block changes (%s in cmd is replaced by block hash)

However, bitcannad will gladly send several notifications about the same block. Consider the following configuration entry:

blocknotify=/usr/bin/logger -t bitcanna %s

This can result in syslog lines like these:

Oct 19 11:27:16 beatbox bitcanna[364961]: 340ce5ab9b0131858b095126d681c0743e387badd58f281cf961fcbd2586f878
Oct 19 11:27:16 beatbox bitcanna[364963]: 340ce5ab9b0131858b095126d681c0743e387badd58f281cf961fcbd2586f878
Oct 19 11:27:43 beatbox bitcanna[365051]: 416bacf11df07259eae3e1f34d57d51c419aece830d66f607f37565475969660
Oct 19 11:27:43 beatbox bitcanna[365053]: 416bacf11df07259eae3e1f34d57d51c419aece830d66f607f37565475969660
Oct 19 11:27:43 beatbox bitcanna[365055]: 416bacf11df07259eae3e1f34d57d51c419aece830d66f607f37565475969660
Oct 19 11:27:43 beatbox bitcanna[365057]: 416bacf11df07259eae3e1f34d57d51c419aece830d66f607f37565475969660
Oct 19 11:27:43 beatbox bitcanna[365059]: 416bacf11df07259eae3e1f34d57d51c419aece830d66f607f37565475969660
Oct 19 11:28:26 beatbox bitcanna[365192]: da6f9f26e1f454d3b3b70ad3e2f398360d894a0db37c66b8e87be5e8bf2e4f41
Oct 19 11:28:26 beatbox bitcanna[365194]: da6f9f26e1f454d3b3b70ad3e2f398360d894a0db37c66b8e87be5e8bf2e4f41
Oct 19 11:28:26 beatbox bitcanna[365196]: da6f9f26e1f454d3b3b70ad3e2f398360d894a0db37c66b8e87be5e8bf2e4f41
Oct 19 11:28:59 beatbox bitcanna[365309]: 235ca9e6a9c5930fe998f1d8f0aebd16cfb8189710673f337406361464fb67ee
Oct 19 11:28:59 beatbox bitcanna[365311]: 235ca9e6a9c5930fe998f1d8f0aebd16cfb8189710673f337406361464fb67ee
Oct 19 11:28:59 beatbox bitcanna[365313]: 235ca9e6a9c5930fe998f1d8f0aebd16cfb8189710673f337406361464fb67ee
Oct 19 11:28:59 beatbox bitcanna[365315]: 235ca9e6a9c5930fe998f1d8f0aebd16cfb8189710673f337406361464fb67ee
Oct 19 11:28:59 beatbox bitcanna[365317]: 235ca9e6a9c5930fe998f1d8f0aebd16cfb8189710673f337406361464fb67ee
Oct 19 11:29:17 beatbox bitcanna[365389]: deb338a36b7240998cb87e8cf38b7ee61443a07910b1e2c83517af2e5bcbcbf8

which feels very spammy.

bitcannad ought to dedupe the blackhashes so that a notification is only ever sent when the blockhash is actually different from the previous blockhash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant