From dbca89b74b76610331d21656cd6747f5bf8375d6 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Tue, 7 Oct 2014 14:22:58 -0400 Subject: 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 --- qa/pull-tester/build-tests.sh.in | 1 + 1 file changed, 1 insertion(+) (limited to 'qa/pull-tester') diff --git a/qa/pull-tester/build-tests.sh.in b/qa/pull-tester/build-tests.sh.in index ebf377a489..1ef47d77f4 100755 --- a/qa/pull-tester/build-tests.sh.in +++ b/qa/pull-tester/build-tests.sh.in @@ -75,6 +75,7 @@ make check # Run RPC integration test on Linux: @abs_top_srcdir@/qa/rpc-tests/wallet.sh @abs_top_srcdir@/linux-build/src @abs_top_srcdir@/qa/rpc-tests/listtransactions.py --srcdir @abs_top_srcdir@/linux-build/src +@abs_top_srcdir@/qa/rpc-tests/forknotify.py --srcdir @abs_top_srcdir@/linux-build/src # Clean up cache/ directory that the python regression tests create rm -rf cache -- cgit v1.2.3