HomePhabricator

show amounts in XEC for CTransaction in logs

Description

show amounts in XEC for CTransaction in logs

Summary:
CommitTransaction logs a string-serialized version of the transaction. The outputs were still shown in BCHA units. Fix it to show XEC amounts instead.

Note that this serialization code duplicates the FormatMoney function, but FormatMoney also needs to account for the -ecash argument, and we don't want to pull ArgsManager into libbitcoinconsensus.

Test Plan:
Run wallet_basic.py with an assert False at the end, inspect the debug log and check that all CTransactions in the log show XEC amounts.

Search for usages of COIN in the codebase and check that it is not used in any other user-facing logs or outputs.

ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D14413

Details

Provenance
PiRKAuthored on Aug 25 2023, 14:29
PiRKPushed on Aug 30 2023, 10:22
Reviewer
Restricted Project
Differential Revision
D14413: show amounts in XEC for CTransaction in logs
Parents
rABCc3e7eedc95d2: [avalanche] Deterministically select a payout script from the previous blockā€¦
Branches
Unknown
Tags
Unknown