From 38a55b57f127197229de9f47d47104d7ff74cc87 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Mon, 24 Oct 2022 17:38:11 +0000 Subject: [PATCH] minor fixes --- mmgen_node_tools/main_blocks_info.py | 19 +++++++++---------- test/test_py_d/ts_misc.py | 4 ++-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/mmgen_node_tools/main_blocks_info.py b/mmgen_node_tools/main_blocks_info.py index 9295cd0..eb12a5c 100755 --- a/mmgen_node_tools/main_blocks_info.py +++ b/mmgen_node_tools/main_blocks_info.py @@ -74,13 +74,13 @@ block number is expected. If the requested range ends at the current chain tip, an estimate of the next difficulty adjustment is also displayed. The estimate is based on the average -Block Discovery Interval from the beginning of the current 2016-block period. +Block Discovery Interval from the beginning of the current {I}-block period. All fee fields except for 'totalfee' are in satoshis per virtual byte. -AVAILABLE FIELDS: {f} +AVAILABLE FIELDS: {F} -AVAILABLE STATS: {s} +AVAILABLE STATS: {S} EXAMPLES: @@ -110,7 +110,7 @@ EXAMPLES: $ {p} -o block,date,hash 245798 170 624044 Display every difficulty adjustment from Genesis Block to chain tip: - $ {p} -o +difficulty 0-cur+2016 + $ {p} -o +difficulty 0-cur+{I} Display roughly a block a day over the last two weeks. Note that multiplication is allowed in the nBlocks spec: @@ -144,14 +144,13 @@ EXAMPLES: $ {p} --rpc-backend=aio -H +1000 This program requires a txindex-enabled daemon for correct operation. -""".format( - f = fmt_list(BlocksInfo.fields,fmt='bare'), - s = fmt_list(BlocksInfo.all_stats,fmt='bare'), - p = g.prog_name ) - }, +""" }, 'code': { 'notes': lambda proto,s: s.format( - adj_interval = proto.diff_adjust_interval, + I = proto.diff_adjust_interval, + F = fmt_list(BlocksInfo.fields,fmt='bare'), + S = fmt_list(BlocksInfo.all_stats,fmt='bare'), + p = g.prog_name, ) } } diff --git a/test/test_py_d/ts_misc.py b/test/test_py_d/ts_misc.py index 7801f64..ee41377 100755 --- a/test/test_py_d/ts_misc.py +++ b/test/test_py_d/ts_misc.py @@ -17,6 +17,8 @@ from ..include.common import * from .common import * from .ts_base import * +refdir = os.path.join('test','ref','ticker') + class TestSuiteHelp(TestSuiteBase): 'help, info and usage screens' networks = ('btc','ltc','bch') @@ -50,8 +52,6 @@ class TestSuiteHelp(TestSuiteBase): def longhelpscreens(self): return self.helpscreens(arg='--longhelp',expect='USAGE:.*LONG OPTIONS:') -refdir = os.path.join('test','ref','ticker') - class TestSuiteScripts(TestSuiteBase): 'scripts not requiring a coin daemon' networks = ('btc',)