Page MenuHomePhabricator

Convert bitcoin-tx and utilmoneystr to use Amount struct.
ClosedPublic

Authored by schancel on Oct 8 2017, 20:43.

Details

Summary

This diff patches bitcoin-tx and utilmoneystr to use the
Amount struct instead of the previous CAmount typedef.

Test Plan

make VERBOSE=1 check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

  • Switch constant values for fees to Amount as well.
deadalnix requested changes to this revision.Oct 8 2017, 22:53
deadalnix added inline comments.
src/init.cpp
724 ↗(On Diff #1517)

Just make all these constant Amount.

src/test/util_tests.cpp
183 ↗(On Diff #1517)

You should not be able to assign an int to an Amount.

This revision now requires changes to proceed.Oct 8 2017, 22:53
src/test/util_tests.cpp
183 ↗(On Diff #1517)

I'll fix that as the last patch when I make the constructors explicit.

schancel edited edge metadata.
  • Convert several more constants to be of type Amount
This revision is now accepted and ready to land.Oct 9 2017, 17:40
This revision was automatically updated to reflect the committed changes.