aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-10-22 10:08:32 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-10-22 10:08:32 -0500
commit84ce43a23956ac6b5e07dc4c7cd5777d3992046f (patch)
treeb78f4bf073c82576e2ee21d9d33ae900ef14cc6c /src/cryptonote_basic
parentMerge pull request #5964 (diff)
parentSupport median block size > 4 GB (diff)
downloadmonero-84ce43a23956ac6b5e07dc4c7cd5777d3992046f.tar.xz
Merge pull request #5966
be82c40 Support median block size > 4 GB (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_basic')
-rw-r--r--src/cryptonote_basic/cryptonote_basic_impl.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cryptonote_basic/cryptonote_basic_impl.cpp b/src/cryptonote_basic/cryptonote_basic_impl.cpp
index d8de65b81..9bafcfc86 100644
--- a/src/cryptonote_basic/cryptonote_basic_impl.cpp
+++ b/src/cryptonote_basic/cryptonote_basic_impl.cpp
@@ -110,9 +110,6 @@ namespace cryptonote {
return false;
}
- assert(median_weight < std::numeric_limits<uint32_t>::max());
- assert(current_block_weight < std::numeric_limits<uint32_t>::max());
-
uint64_t product_hi;
// BUGFIX: 32-bit saturation bug (e.g. ARM7), the result was being
// treated as 32-bit by default.
@@ -122,8 +119,8 @@ namespace cryptonote {
uint64_t reward_hi;
uint64_t reward_lo;
- div128_32(product_hi, product_lo, static_cast<uint32_t>(median_weight), &reward_hi, &reward_lo);
- div128_32(reward_hi, reward_lo, static_cast<uint32_t>(median_weight), &reward_hi, &reward_lo);
+ div128_64(product_hi, product_lo, median_weight, &reward_hi, &reward_lo, NULL, NULL);
+ div128_64(reward_hi, reward_lo, median_weight, &reward_hi, &reward_lo, NULL, NULL);
assert(0 == reward_hi);
assert(reward_lo < base_reward);