HomePhabricator

Trigger -alertnotify if network is upgrading without you
dbca89b74b76Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Trigger -alertnotify if network is upgrading without you

This adds a -regetest-only undocumented (for regression testing only)
command-line option -blockversion=N to set block.nVersion.

Adds to the "has the rest of the network upgraded to a
block.nVersion we don't understand" code so it calls
-alertnotify when 51 of the last 100 blocks are up-version.
But it only alerts once, not with every subsequent new, upversion
block.

And adds a forknotify.py regression test to make sure it works.

Tested using forknotify.py:

Before adding CAlert::Notify, get:
Assertion failed: -alertnotify did not warn of up-version blocks

Before adding code to only alert once:
Assertion failed: -alertnotify excessive warning of up-version blocks

After final code in this pull:
Tests successful

Details

Provenance
Gavin Andresen <gavinandresen@gmail.com>Authored on Oct 7 2014, 18:22
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGINGe01a7939d3a3: Refactor -alertnotify code
Branches
Unknown
Tags
Unknown

Event Timeline

Gavin Andresen <gavinandresen@gmail.com> committed rSTAGINGdbca89b74b76: Trigger -alertnotify if network is upgrading without you (authored by Gavin Andresen <gavinandresen@gmail.com>).Oct 9 2014, 14:28