diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/structure_v0/mod.rs index 1ad014fe17..7ae98cf477 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/structure_v0/mod.rs @@ -46,7 +46,10 @@ impl DocumentCreateTransitionActionStructureValidationV0 for DocumentCreateTrans // Don't do the following validation on testnet before epoch 2080 // As state transitions already happened that would break this validation + // We want to keep both if-s for better readability + #[allow(clippy::collapsible_if)] if !(network == Network::Testnet && block_info.epoch.index < 2080) { + // Only for contested documents if document_type .contested_vote_poll_for_document_properties(self.data(), platform_version)? .is_some() diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/mod.rs index 51c1dd11fa..1cb7c26a62 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/mod.rs @@ -1240,6 +1240,7 @@ mod tests { .expect("expected a base transition"), entropy: entropy.0, data: document_1.clone().properties_consumed(), + // Sending 0 balance that should not be valid prefunded_voting_balance: None, } .into(); @@ -1397,7 +1398,7 @@ mod tests { .expect("expected to get back documents") .documents_owned(); - assert!(documents.get(0).is_none()); + assert!(documents.first().is_none()); } #[test] @@ -1671,7 +1672,7 @@ mod tests { .expect("expected to get back documents") .documents_owned(); - assert!(documents.get(0).is_some()); + assert!(documents.first().is_some()); } #[test]