Skip to content

Commit

Permalink
no assert for uncle count == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhhuang authored and simonjiao committed Apr 28, 2024
1 parent 18495e0 commit 3f8a155
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sources/Epoch.move
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ module Epoch {
CoreAddresses::assert_genesis_address(account);

let epoch_ref = borrow_global_mut<Epoch>(CoreAddresses::GENESIS_ADDRESS());
assert!(epoch_ref.max_uncles_per_block >= uncles, Errors::invalid_argument(EINVALID_UNCLES_COUNT));
// assert!(epoch_ref.max_uncles_per_block >= uncles, Errors::invalid_argument(EINVALID_UNCLES_COUNT));

let epoch_data = borrow_global_mut<EpochData>(CoreAddresses::GENESIS_ADDRESS());
let (new_epoch, reward_per_block) = if (block_number < epoch_ref.end_block_number) {
(false, epoch_ref.reward_per_block)
} else if (block_number == epoch_ref.end_block_number) {
//start a new epoch
assert!(uncles == 0, Errors::invalid_argument(EINVALID_UNCLES_COUNT));
// assert!(uncles == 0, Errors::invalid_argument(EINVALID_UNCLES_COUNT));
// block time target unit is milli_seconds.
let now_milli_seconds = timestamp;

Expand Down Expand Up @@ -377,4 +377,4 @@ module Epoch {
}

}
}
}

0 comments on commit 3f8a155

Please sign in to comment.