Skip to content
Merged
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
14 changes: 8 additions & 6 deletions cardano_node_tests/utils/dbsync_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

LOGGER = logging.getLogger(__name__)

_MISSING: tp.Final = object()


class DbSyncNoResponseError(Exception):
"""Raised when no response is returned from db-sync."""
Expand Down Expand Up @@ -933,12 +935,12 @@ def _check_param_proposal(
failures = []

for param_name, protocol_value in params_map.items():
if protocol_value:
db_value = getattr(param_proposal_db, param_name)
if db_value and (db_value != protocol_value):
failures.append(
f"Param value for {param_name}: {db_value}. Expected: {protocol_value}"
)
if protocol_value is None:
continue
db_value = getattr(param_proposal_db, param_name, _MISSING)
if db_value is _MISSING or db_value == protocol_value:
continue
Comment thread
mkoura marked this conversation as resolved.
failures.append(f"Param value for {param_name}: {db_value}. Expected: {protocol_value}")
return failures


Expand Down
Loading