diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-09-27 12:01:47 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-09-27 12:02:17 -0400 |
commit | 134b42a409eca0171adbb1e5b49b32f1c13c3733 (patch) | |
tree | a4ed9aa7fe01e97fa1e487f78be328ecba30588b /src/test | |
parent | 01211cea71016ceadfcbe98a8ec660a5071bd82e (diff) | |
parent | fa84723e73d3d7766e7821881ac96ec203e50efc (diff) |
Merge #14244: amount: Move CAmount CENT to unit test header
fa84723e73 amount: Move CAmount CENT to unit test header (MarcoFalke)
Pull request description:
`CAmount` is currently not type-safe. Exporting a constant (`CENT`) that is commonly not referred to by that name might be confusing. `CENT` is only used in two places prior to this commit (`ParseMoney` and `MIN_CHANGE`). So replace these with constants relative to `COIN` and move `CENT` to the unit test header.
Tree-SHA512: 5273e96d8664ced6ae211abde2e20bc763e6e99f89404eec02c621f29e1d235e5f9b1ade933743843fae16fc24b643f883deda9221e3d9fd31229d2ab63a914f
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_bitcoin.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h index b87d9bea5d..3872767133 100644 --- a/src/test/test_bitcoin.h +++ b/src/test/test_bitcoin.h @@ -37,6 +37,8 @@ static inline uint64_t InsecureRandBits(int bits) { return insecure_rand_ctx.ran static inline uint64_t InsecureRandRange(uint64_t range) { return insecure_rand_ctx.randrange(range); } static inline bool InsecureRandBool() { return insecure_rand_ctx.randbool(); } +static constexpr CAmount CENT{1000000}; + /** Basic testing setup. * This just configures logging and chain parameters. */ |