diff --git a/README-CN.md b/README-CN.md index e200351..3f99472 100644 --- a/README-CN.md +++ b/README-CN.md @@ -206,9 +206,9 @@ POST /requests/{:id}/speedup #### 请求参数 -| 参数名 | 值 | 是否必须 | 说明 | -|-----------|------|------|---------------------------------| -| fee_limit | 1FIL | 否 | 允许最大消耗的GAS费用,不传系统自动预估,值越大上链时间越快 | +| 参数名 | 值 | 是否必须 | 说明 | +|-----------|------|------|-----------------------| +| fee_limit | 1FIL | 否 | 允许最大消耗的GAS费用,不传系统自动预估 | #### 请求示例 ```json diff --git a/README.md b/README.md index 7f2ffec..75522cd 100644 --- a/README.md +++ b/README.md @@ -205,9 +205,9 @@ POST /requests/{:id}/speedup > This does not guarantee the message will be on-chain. Check the request status again after a while and try multiple times if needed. #### Request parameters -| Parameter | Value | Required | Description | -|-----------|-------|----------|----------------------------------------------------------------------------------------------------------------------| -| fee_limit | 1FIL | No | Maximum allowable gas fee; if not provided, the system estimates; the higher the value, the faster the on-chain time | +| Parameter | Value | Required | Description | +|-----------|-------|----------|-------------------------------------------------------------------| +| fee_limit | 1FIL | No | Maximum allowable gas fee; if not provided, the system estimates; | #### Request Example ```json diff --git a/service.go b/service.go index e94eeb0..6f1a1b0 100644 --- a/service.go +++ b/service.go @@ -864,14 +864,16 @@ func (s *Service) replaceMessage(ctx context.Context, id uint, mss *api.MessageS defaultRBF := messagepool.ComputeRBF(msg.GasPremium, cfg.ReplaceByFeeRatio) - msg.GasLimit = 0 // clear gas limit + //msg.GasLimit = 0 // clear gas limit + msg.GasFeeCap = abi.NewTokenAmount(0) + msg.GasPremium = abi.NewTokenAmount(0) ret, err := s.api.GasEstimateMessageGas(ctx, &msg, mss, types.EmptyTSK) if err != nil { return fmt.Errorf("failed to estimate gas values: %w", err) } msg.GasPremium = big.Max(ret.GasPremium, defaultRBF) msg.GasFeeCap = big.Max(ret.GasFeeCap, msg.GasPremium) - msg.GasLimit = ret.GasLimit // set new gas limit + //msg.GasLimit = ret.GasLimit // set new gas limit mff := func() (abi.TokenAmount, error) { return abi.TokenAmount(config.DefaultDefaultMaxFee), nil