Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): fix upgrade tests because of 51% limit on v1 #2151

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading