Skip to content

Commit

Permalink
sampling randomness out of range results in revert not fault (#2409)
Browse files Browse the repository at this point in the history
also add error code 1 to RevertErrorWrap to be consistent
  • Loading branch information
ZenGround0 committed Mar 25, 2019
1 parent 26039fe commit f120fe9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actor/builtin/miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ func (ma *Actor) SubmitPoSt(ctx exec.VMContext, postProofs []proofs.PoStProof) (

seed, err := currentProvingPeriodPoStChallengeSeed(ctx, state)
if err != nil {
return nil, errors.FaultErrorWrap(err, "failed to sample chain for challenge seed")
return nil, errors.RevertErrorWrap(err, "failed to sample chain for challenge seed")
}

var commRs []proofs.CommR
Expand Down
2 changes: 1 addition & 1 deletion vm/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func NewCodedRevertErrorf(code uint8, format string, args ...interface{}) error

// RevertErrorWrap wraps a given error in a RevertError.
func RevertErrorWrap(err error, msg string) error {
return &RevertError{err: err, msg: msg}
return &RevertError{err: err, msg: msg, code: 1}
}

// RevertErrorWrapf wraps a given error in a RevertError and adds a message
Expand Down

0 comments on commit f120fe9

Please sign in to comment.