1. not need to panic 2. fix error message (#3692)

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

View File

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