diff --git a/actors/miner/src/lib.rs b/actors/miner/src/lib.rs index a1af6fef48..cd825a620f 100644 --- a/actors/miner/src/lib.rs +++ b/actors/miner/src/lib.rs @@ -1098,6 +1098,9 @@ impl Actor { return Err(actor_error!(illegal_argument, "no valid updates")); } let proven_batch = proven_batch_gen.gen(); + if proven_batch.success_count == 0 { + return Err(actor_error!(illegal_argument, "no valid proofs specified")); + } // Activate data. let data_activation_inputs: Vec = proven_manifests @@ -1114,6 +1117,9 @@ impl Actor { // Activate data for proven updates. let (data_batch, data_activations) = activate_sectors_pieces(rt, data_activation_inputs, params.require_activation_success)?; + if data_batch.success_count == 0 { + return Err(actor_error!(illegal_argument, "all data activations failed")); + } // Successful data activation is required for sector activation. let successful_manifests = data_batch.successes(&proven_manifests); @@ -1789,6 +1795,9 @@ impl Actor { proven_batch_gen.add_successes(validation_batch.size()); } let proven_batch = proven_batch_gen.gen(); + if proven_batch.success_count == 0 { + return Err(actor_error!(illegal_argument, "no valid proofs specified")); + } // Activate data and verify CommD matches the declared one. let data_activation_inputs = proven_activation_inputs @@ -1807,6 +1816,9 @@ impl Actor { // Activate data for proven sectors. let (data_batch, data_activations) = activate_sectors_pieces(rt, data_activation_inputs, params.require_activation_success)?; + if data_batch.success_count == 0 { + return Err(actor_error!(illegal_argument, "all data activations failed")); + } // Successful data activation is required for sector activation. let successful_sector_activations = data_batch.successes(&proven_activation_inputs);