Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F12428700
D2567.id7386.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Subscribers
None
D2567.id7386.diff
View Options
diff --git a/test/functional/abc-cmdline.py b/test/functional/abc-cmdline.py
--- a/test/functional/abc-cmdline.py
+++ b/test/functional/abc-cmdline.py
@@ -40,20 +40,21 @@
def excessiveblocksize_test(self):
self.log.info("Testing -excessiveblocksize")
- self.log.info(" Set to twice the default, i.e. %d bytes" %
- (2 * LEGACY_MAX_BLOCK_SIZE))
+ self.log.info(" Set to twice the default, i.e. {} bytes".format(
+ 2 * LEGACY_MAX_BLOCK_SIZE))
self.stop_node(0)
- self.start_node(0, ["-excessiveblocksize=%d" %
- (2 * LEGACY_MAX_BLOCK_SIZE)])
+ self.start_node(0, ["-excessiveblocksize={}".format(
+ 2 * LEGACY_MAX_BLOCK_SIZE)])
self.check_excessive(2 * LEGACY_MAX_BLOCK_SIZE)
# Check for EB correctness in the subver string
self.check_subversion("/Bitcoin ABC:.*\(EB2\.0; .*\)/")
- self.log.info(" Attempt to set below legacy limit of 1MB - try %d bytes" %
- LEGACY_MAX_BLOCK_SIZE)
+ self.log.info(" Attempt to set below legacy limit of 1MB - try {} bytes".format(
+ LEGACY_MAX_BLOCK_SIZE))
self.stop_node(0)
self.assert_start_raises_init_error(
- 0, ["-excessiveblocksize=%d" % LEGACY_MAX_BLOCK_SIZE], 'Error: Excessive block size must be > 1,000,000 bytes (1MB)')
+ 0, ["-excessiveblocksize={}".format(LEGACY_MAX_BLOCK_SIZE)],
+ 'Error: Excessive block size must be > 1,000,000 bytes (1MB)')
self.log.info(" Attempt to set below blockmaxsize (mining limit)")
self.assert_start_raises_init_error(
0, ['-blockmaxsize=1500000', '-excessiveblocksize=1300000'], 'Error: ' + MAX_GENERATED_BLOCK_SIZE_ERROR)
diff --git a/test/functional/abc-magnetic-anomaly-mining.py b/test/functional/abc-magnetic-anomaly-mining.py
--- a/test/functional/abc-magnetic-anomaly-mining.py
+++ b/test/functional/abc-magnetic-anomaly-mining.py
@@ -26,7 +26,7 @@
self.mocktime = int(time.time()) - 600 * 100
extra_arg = ['-spendzeroconfchange=0', '-whitelist=127.0.0.1',
- "-replayprotectionactivationtime=%d" % (10 * self.mocktime)]
+ "-replayprotectionactivationtime={}".format(10 * self.mocktime)]
self.extra_args = [extra_arg, extra_arg]
def run_test(self):
diff --git a/test/functional/abc-p2p-compactblocks.py b/test/functional/abc-p2p-compactblocks.py
--- a/test/functional/abc-p2p-compactblocks.py
+++ b/test/functional/abc-p2p-compactblocks.py
@@ -79,7 +79,7 @@
'-limitdescendantcount=999999',
'-limitdescendantsize=999999',
'-maxmempool=99999',
- "-excessiveblocksize=%d" % self.excessive_block_size]]
+ "-excessiveblocksize={}".format(self.excessive_block_size)]]
def add_options(self, parser):
super().add_options(parser)
diff --git a/test/functional/abc-p2p-fullblocktest.py b/test/functional/abc-p2p-fullblocktest.py
--- a/test/functional/abc-p2p-fullblocktest.py
+++ b/test/functional/abc-p2p-fullblocktest.py
@@ -46,8 +46,9 @@
self.blocks = {}
self.excessive_block_size = 100 * ONE_MEGABYTE
self.extra_args = [['-whitelist=127.0.0.1',
- "-replayprotectionactivationtime=%d" % REPLAY_PROTECTION_START_TIME,
- "-excessiveblocksize=%d" % self.excessive_block_size]]
+ "-replayprotectionactivationtime={}".format(
+ REPLAY_PROTECTION_START_TIME),
+ "-excessiveblocksize={}".format(self.excessive_block_size)]]
def add_options(self, parser):
super().add_options(parser)
diff --git a/test/functional/abc-parkedchain.py b/test/functional/abc-parkedchain.py
--- a/test/functional/abc-parkedchain.py
+++ b/test/functional/abc-parkedchain.py
@@ -162,7 +162,8 @@
wait_until(check_block)
def check_reorg_protection(depth, extra_blocks):
- self.log.info("Test deep reorg parking, %d block deep" % depth)
+ self.log.info(
+ "Test deep reorg parking, {} block deep".format(depth))
# Invalidate the tip on node 0, so it doesn't follow node 1.
node.invalidateblock(node.getbestblockhash())
diff --git a/test/functional/abc-replay-protection.py b/test/functional/abc-replay-protection.py
--- a/test/functional/abc-replay-protection.py
+++ b/test/functional/abc-replay-protection.py
@@ -42,7 +42,7 @@
self.tip = None
self.blocks = {}
self.extra_args = [['-whitelist=127.0.0.1',
- "-replayprotectionactivationtime=%d" % REPLAY_PROTECTION_START_TIME]]
+ "-replayprotectionactivationtime={}".format(REPLAY_PROTECTION_START_TIME)]]
def run_test(self):
self.test = TestManager(self, self.options.tmpdir)
diff --git a/test/functional/abc-rpc.py b/test/functional/abc-rpc.py
--- a/test/functional/abc-rpc.py
+++ b/test/functional/abc-rpc.py
@@ -42,8 +42,10 @@
assert_equal(ebs, LEGACY_MAX_BLOCK_SIZE + 1)
# Check that going below legacy size is not accepted
- assert_raises_rpc_error(-8, "Invalid parameter, excessiveblock must be larger than %d" %
- LEGACY_MAX_BLOCK_SIZE, self.nodes[0].setexcessiveblock, LEGACY_MAX_BLOCK_SIZE)
+ assert_raises_rpc_error(-8,
+ "Invalid parameter, excessiveblock must be larger than {}".format(
+ LEGACY_MAX_BLOCK_SIZE),
+ self.nodes[0].setexcessiveblock, LEGACY_MAX_BLOCK_SIZE)
getsize = self.nodes[0].getexcessiveblock()
ebs = getsize['excessiveBlockSize']
assert_equal(ebs, LEGACY_MAX_BLOCK_SIZE + 1)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 28, 19:18 (7 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4844919
Default Alt Text
D2567.id7386.diff (5 KB)
Attached To
D2567: Update abc-* functional tests to use the new .format() method
Event Timeline
Log In to Comment