Skip to content

Commit

Permalink
test: Add test for diffrent signet data directories
Browse files Browse the repository at this point in the history
- Added a test to verify the Signet data directory when -signetchallenge=51 is correctly set to 'signet_da1745e9'.
- Added a test to verify the main Signet data directory is correctly set to 'signet'.
  • Loading branch information
BrandonOdiwuor committed May 22, 2024
1 parent ac1ccd5 commit 50f4ca2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/functional/feature_signet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""Test basic signet functionality"""

from decimal import Decimal
from os import path

from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal
Expand Down Expand Up @@ -73,6 +74,12 @@ def run_test(self):

assert_equal(self.nodes[4].submitblock(signet_blocks[0]), 'bad-signet-blksig')

self.log.info("Test that the signet data directory with -signetchallenge=51 is 'signet_da1745e9'")
assert_equal(path.basename(self.nodes[0].chain_path), "signet_da1745e9")

self.log.info("Test that the main signet data directory is 'signet'")
assert_equal(path.basename(self.nodes[3].chain_path), "signet")

self.log.info("test that signet logs the network magic on node start")
with self.nodes[0].assert_debug_log(["Signet derived magic (message start)"]):
self.restart_node(0)
Expand Down

0 comments on commit 50f4ca2

Please sign in to comment.