Skip to content

Commit

Permalink
feat(data_requests): increase max witnesses on testnet and dev envs
Browse files Browse the repository at this point in the history
  • Loading branch information
guidiaz committed Jan 28, 2025
1 parent 0130295 commit 2223d30
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions data_structures/src/data_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ use witnet_crypto::hash::calculate_sha256;
use crate::{
chain::{
tapi::ActiveWips, DataRequestInfo, DataRequestOutput, DataRequestStage, DataRequestState,
Epoch, Hash, Hashable, PublicKeyHash, ValueTransferOutput,
Environment, Epoch, Hash, Hashable, PublicKeyHash, ValueTransferOutput,
},
error::{DataRequestError, TransactionError},
get_protocol_version_activation_epoch,
get_environment, get_protocol_version_activation_epoch,
proto::versioning::{ProtocolVersion, VersionedHashable},
radon_report::{RadonReport, Stage, TypeLike},
transaction::{CommitTransaction, DRTransaction, RevealTransaction, TallyTransaction},
Expand Down Expand Up @@ -579,7 +579,10 @@ pub fn data_request_has_too_many_witnesses(
if ProtocolVersion::from_epoch_opt(epoch) < ProtocolVersion::V2_0 {
false
} else {
usize::from(dr_output.witnesses) > validator_count / 4
match get_environment() {
Environment::Mainnet => usize::from(dr_output.witnesses) > validator_count / 4,
_ => usize::from(dr_output.witnesses) > validator_count,
}
}
}

Expand Down

0 comments on commit 2223d30

Please sign in to comment.