No need to panic (#3694)

This commit is contained in:
mars 2022-03-15 15:47:23 +08:00 committed by GitHub
parent 8c8d1603e1
commit a0765a8bc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,7 +206,7 @@ func (args *TraceCallParam) ToMessage(globalGasCap uint64, baseFee *uint256.Int)
if args.Value != nil {
overflow := value.SetFromBig(args.Value.ToInt())
if overflow {
panic(fmt.Errorf("args.Value higher than 2^256-1"))
return types.Message{}, fmt.Errorf("args.Value higher than 2^256-1")
}
}
var data []byte