From c29dd721747ac4f7df3cac8bf9d6a4a9cccfb2ff Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Thu, 6 Aug 2020 21:45:03 +0200 Subject: [PATCH] add check for feecap and premium to vm.checkMessage Signed-off-by: Jakub Sztandera --- chain/vm/vm.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chain/vm/vm.go b/chain/vm/vm.go index 8b2c14316..2d1623cd2 100644 --- a/chain/vm/vm.go +++ b/chain/vm/vm.go @@ -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 {