Skip to content

Commit

Permalink
fix(tests): fix upgrade tests because of 51% limit on v1 (#2151)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumExplorer authored Sep 19, 2024
1 parent b72e608 commit 81e7960
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ impl<C> Platform<C> {
{
// This is a solution for the emergency update to version 3
// We clean this up immediately though as we transition to check_for_desired_protocol_upgrade_v1
51
u64::min(
51,
platform_version
.drive_abci
.methods
.protocol_upgrade
.protocol_version_upgrade_percentage_needed,
)
} else {
platform_version
.drive_abci
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ mod tests {
use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters;
use dpp::block::extended_epoch_info::v0::ExtendedEpochInfoV0Getters;
use dpp::dashcore::hashes::Hash;
use dpp::dashcore::Network::Regtest;
use dpp::dashcore::{BlockHash, ChainLock};
use dpp::version::PlatformVersion;
use drive::config::DriveConfig;
Expand Down Expand Up @@ -775,6 +776,7 @@ mod tests {
};
let hour_in_ms = 1000 * 60 * 60;
let config = PlatformConfig {
network: Regtest,
validator_set: ValidatorSetConfig {
quorum_size: 40,
..Default::default()
Expand Down Expand Up @@ -1015,6 +1017,7 @@ mod tests {
};
let hour_in_ms = 1000 * 60 * 60;
let mut config = PlatformConfig {
network: Regtest,
validator_set: ValidatorSetConfig {
quorum_size: 50,
..Default::default()
Expand Down

0 comments on commit 81e7960

Please sign in to comment.