Skip to content

Commit 4bd530d

Browse files
committed
feat: improve logging with ADA conversion
- Updated logging in `testnet_cleanup_info.py` to include ADA conversion for balance and rewards. - Modified `testnet_cleanup.py` to log balance in ADA instead of Lovelace.
1 parent 1872179 commit 4bd530d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cardano_node_tests/testnet_cleanup_info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def main() -> int:
4444
cluster_obj = clusterlib.ClusterLib(state_dir=state_dir)
4545
location = pl.Path(args.artifacts_base_dir).expanduser().resolve()
4646
balance, rewards = testnet_cleanup.addresses_info(cluster_obj=cluster_obj, location=location)
47-
LOGGER.info(f"Uncleaned balance: {balance}")
48-
LOGGER.info(f"Uncleaned rewards: {rewards}")
47+
LOGGER.info(f"Uncleaned balance: {balance} Lovelace ({balance / 1_000_000} ADA)")
48+
LOGGER.info(f"Uncleaned rewards: {rewards} Lovelace ({balance / 1_000_000} ADA)")
4949

5050
return 0
5151

cardano_node_tests/utils/testnet_cleanup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def addresses_info(cluster_obj: clusterlib.ClusterLib, location: pl.Path) -> tp.
414414
if f_balance:
415415
has_tokens = len(lovelace_utxos) != len(utxos)
416416
tokens_str = " + tokens" if has_tokens else ""
417-
LOGGER.info(f"{f_balance}{tokens_str} on '{fpath}'")
417+
LOGGER.info(f"{f_balance / 1_000_000} ADA{tokens_str} on '{fpath}'")
418418
balance += f_balance
419419

420420
return balance, rewards

0 commit comments

Comments
 (0)