Skip to content

Commit

Permalink
adding changes
Browse files Browse the repository at this point in the history
  • Loading branch information
laudiacay committed Dec 2, 2021
1 parent eb1c5cc commit f3a05e8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions vm/actor/src/builtin/miner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,22 @@ impl Actor {
{
let current_epoch = rt.curr_epoch();

if params.proofs.len() != 1 {
return Err(actor_error!(
ErrIllegalArgument,
"expected exactly one proof, got {}",
params.proofs.len()
));
}

if check_valid_post_proof_type(params.proofs[0].post_proof).is_err() {
return Err(actor_error!(
ErrIllegalArgument,
"proof type {:?} not allowed",
params.proofs[0].post_proof
));
}

if params.deadline >= WPOST_PERIOD_DEADLINES as usize {
return Err(actor_error!(
ErrIllegalArgument,
Expand Down

0 comments on commit f3a05e8

Please sign in to comment.