add check for feecap and premium to vm.checkMessage

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-08-06 21:45:03 +02:00
parent 562a3f482e
commit c29dd72174
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -293,8 +293,12 @@ func checkMessage(msg *types.Message) error {
return xerrors.Errorf("message has negative gas limit")
}
if msg.GasPrice == types.EmptyInt {
return xerrors.Errorf("message gas no gas price set")
if msg.GasFeeCap == types.EmptyInt {
return xerrors.Errorf("message fee cap not set")
}
if msg.GasPremium == types.EmptyInt {
return xerrors.Errorf("message gas premium not set")
}
if msg.Value == types.EmptyInt {