Introduce separate 'generate' RPC call

This commit is contained in:
Pieter Wuille
2015-03-31 20:28:28 -07:00
parent 0df67f1f7a
commit 6b04508e37
25 changed files with 162 additions and 142 deletions

View File

@@ -34,12 +34,12 @@ class ForkNotifyTest(BitcoinTestFramework):
def run_test(self):
# Mine 51 up-version blocks
self.nodes[1].setgenerate(True, 51)
self.nodes[1].generate(51)
self.sync_all()
# -alertnotify should trigger on the 51'st,
# but mine and sync another to give
# -alertnotify time to write
self.nodes[1].setgenerate(True, 1)
self.nodes[1].generate(1)
self.sync_all()
with open(self.alert_filename, 'r') as f:
@@ -49,9 +49,9 @@ class ForkNotifyTest(BitcoinTestFramework):
raise AssertionError("-alertnotify did not warn of up-version blocks")
# Mine more up-version blocks, should not get more alerts:
self.nodes[1].setgenerate(True, 1)
self.nodes[1].generate(1)
self.sync_all()
self.nodes[1].setgenerate(True, 1)
self.nodes[1].generate(1)
self.sync_all()
with open(self.alert_filename, 'r') as f: