Update gas limits, update storage-fsm

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera
2020-07-15 21:21:53 +02:00
parent 7b14d445b4
commit 399c171f03
7 changed files with 22 additions and 19 deletions
+6
View File
@@ -90,6 +90,12 @@ func (a *MpoolAPI) MpoolPushMessage(ctx context.Context, msg *types.Message) (*t
if msg.Nonce != 0 {
return nil, xerrors.Errorf("MpoolPushMessage expects message nonce to be 0, was %d", msg.Nonce)
}
if msg.GasLimit == 0 {
msg.GasLimit = 100_000_000 // TODO: gas limit estimation
}
if types.BigCmp(msg.GasPrice, types.NewInt(0)) == 0 {
msg.GasPrice = types.NewInt(1) // TODO: gas price estimation
}
return a.Mpool.PushWithNonce(ctx, msg.From, func(from address.Address, nonce uint64) (*types.SignedMessage, error) {
msg.Nonce = nonce