Browse Source
Merge pull request #157 from comit-network/good-at-maths
Fix `MAX_PRICE_DEC`
fix-bad-api-calls
Lucas Soriano
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
cfd_protocol/src/interval.rs
|
|
@ -5,7 +5,7 @@ use std::ops::RangeInclusive; |
|
|
|
mod digit_decomposition; |
|
|
|
|
|
|
|
/// Maximum supported BTC price in whole USD.
|
|
|
|
const MAX_PRICE_DEC: u64 = (BASE as u64).pow(MAX_DIGITS as u32); |
|
|
|
const MAX_PRICE_DEC: u64 = (BASE as u64).pow(MAX_DIGITS as u32) - 1; |
|
|
|
|
|
|
|
/// Maximum number of binary digits for BTC price in whole USD.
|
|
|
|
const MAX_DIGITS: usize = 20; |
|
|
|