testnet update: rename testnet3 to testnet
Update all references to 'testnet3' to 'testnet' for consistency. This includes: - Changing magic bytes in network messages - Updating directory paths and configuration files - Modifying documentation and test framework references - Adjusting chain parameters and validation logic
This commit is contained in:
@@ -20,13 +20,13 @@ import os
|
||||
class RejectLowDifficultyHeadersTest(PalladiumTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
self.chain = 'testnet3' # Use testnet chain because it has an early checkpoint
|
||||
self.chain = 'testnet'
|
||||
self.num_nodes = 2
|
||||
|
||||
def add_options(self, parser):
|
||||
parser.add_argument(
|
||||
'--datafile',
|
||||
default='data/blockheader_testnet3.hex',
|
||||
default='data/blockheader_testnet.hex',
|
||||
help='Test data file (default: %(default)s)',
|
||||
)
|
||||
|
||||
@@ -36,7 +36,7 @@ class RejectLowDifficultyHeadersTest(PalladiumTestFramework):
|
||||
with open(self.headers_file_path, encoding='utf-8') as headers_data:
|
||||
h_lines = [l.strip() for l in headers_data.readlines()]
|
||||
|
||||
# The headers data is taken from testnet3 for early blocks from genesis until the first checkpoint. There are
|
||||
# The headers data is taken from testnet for early blocks from genesis until the first checkpoint. There are
|
||||
# two headers with valid POW at height 1 and 2, forking off from genesis. They are indicated by the FORK_PREFIX.
|
||||
FORK_PREFIX = 'fork:'
|
||||
self.headers = [l for l in h_lines if not l.startswith(FORK_PREFIX)]
|
||||
|
||||
@@ -90,7 +90,7 @@ MESSAGEMAP = {
|
||||
|
||||
MAGIC_BYTES = {
|
||||
"mainnet": b"\xf9\xbe\xb4\xd9", # mainnet
|
||||
"testnet3": b"\x0b\x11\x09\x07", # testnet3
|
||||
"testnet": b"\x0c\x12\x0a\x08", # testnet
|
||||
"regtest": b"\xfa\xbf\xb5\xda", # regtest
|
||||
}
|
||||
|
||||
|
||||
@@ -302,7 +302,7 @@ def initialize_datadir(dirname, n, chain):
|
||||
if not os.path.isdir(datadir):
|
||||
os.makedirs(datadir)
|
||||
# Translate chain name to config name
|
||||
if chain == 'testnet3':
|
||||
if chain == 'testnet':
|
||||
chain_name_conf_arg = 'testnet'
|
||||
chain_name_conf_section = 'test'
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user