Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion hathor_cli/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,11 @@ def create_manager(self, reactor: Reactor) -> HathorManager:

test_mode = TestMode.DISABLED
if self._args.test_mode_tx_weight:
test_mode = TestMode.TEST_TX_WEIGHT
test_mode |= TestMode.TEST_TX_WEIGHT
if self.wallet:
self.wallet.test_mode = True
if self._args.test_mode_block_weight:
test_mode |= TestMode.TEST_BLOCK_WEIGHT

daa = DifficultyAdjustmentAlgorithm(settings=settings, test_mode=test_mode)

Expand Down
3 changes: 3 additions & 0 deletions hathor_cli/run_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def temp_fifo(filename: str, tempdir: str | None) -> Iterator[None]:
class RunNode:
UNSAFE_ARGUMENTS: list[tuple[str, Callable[['RunNodeArgs'], bool]]] = [
('--test-mode-tx-weight', lambda args: bool(args.test_mode_tx_weight)),
('--test-mode-block-weight', lambda args: bool(args.test_mode_block_weight)),
('--enable-crash-api', lambda args: bool(args.enable_crash_api)),
('--sync-bridge', lambda args: bool(args.sync_bridge)),
('--sync-v1-only', lambda args: bool(args.sync_v1_only)),
Expand Down Expand Up @@ -87,6 +88,8 @@ def create_parser(cls) -> ArgumentParser:

parser.add_argument('--test-mode-tx-weight', action='store_true',
help='Reduces tx weight to 1 for testing purposes')
parser.add_argument('--test-mode-block-weight', action='store_true',
help='Reduces block weight to 1 for testing purposes')
parser.add_argument('--dns', action='append', help='Seed DNS')
parser.add_argument('--peer', help='json file with peer info')
parser.add_argument('--sysctl',
Expand Down
1 change: 1 addition & 0 deletions hathor_cli/run_node_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class RunNodeArgs(BaseModel):
testnet_hotel: bool
testnet_golf: bool
test_mode_tx_weight: bool
test_mode_block_weight: bool
dns: Optional[str]
peer: Optional[str]
sysctl: Optional[str]
Expand Down
Loading