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
Branch
shammah/amount2
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 962
Build 962: arc lint + arc unit

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

Just make all these constant Amount.

src/test/util_tests.cpp
183

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

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.