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
parent
commit
accb5fcbbb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cfd_protocol/src/interval.rs

2
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;

Loading…
Cancel
Save