Skip to content

Commit 06f24bb

Browse files
committed
feat(data_requests): increase max witnesses on testnet and dev envs
1 parent 0130295 commit 06f24bb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

data_structures/src/data_request.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ use witnet_crypto::hash::calculate_sha256;
1111
use crate::{
1212
chain::{
1313
tapi::ActiveWips, DataRequestInfo, DataRequestOutput, DataRequestStage, DataRequestState,
14-
Epoch, Hash, Hashable, PublicKeyHash, ValueTransferOutput,
14+
Environment, Epoch, Hash, Hashable, PublicKeyHash, ValueTransferOutput,
1515
},
1616
error::{DataRequestError, TransactionError},
17-
get_protocol_version_activation_epoch,
17+
get_environment, get_protocol_version_activation_epoch,
1818
proto::versioning::{ProtocolVersion, VersionedHashable},
1919
radon_report::{RadonReport, Stage, TypeLike},
2020
transaction::{CommitTransaction, DRTransaction, RevealTransaction, TallyTransaction},
@@ -579,7 +579,10 @@ pub fn data_request_has_too_many_witnesses(
579579
if ProtocolVersion::from_epoch_opt(epoch) < ProtocolVersion::V2_0 {
580580
false
581581
} else {
582-
usize::from(dr_output.witnesses) > validator_count / 4
582+
match get_environment() {
583+
Environment::Mainnet => usize::from(dr_output.witnesses) > validator_count / 4,
584+
_ => usize::from(dr_output.witnesses) > validator_count,
585+
}
583586
}
584587
}
585588

0 commit comments

Comments
 (0)