Merge pull request #2908 from filecoin-project/fix/gasfee-est
Fix/gasfee est
This commit is contained in:
commit
702d95503b
@ -222,7 +222,7 @@ func New(api Provider, ds dtypes.MetadataDS, netName dtypes.NetworkName) (*Messa
|
||||
mp := &MessagePool{
|
||||
ds: ds,
|
||||
closer: make(chan struct{}),
|
||||
repubTk: build.Clock.Ticker(time.Duration(build.BlockDelaySecs) * 10 * time.Second),
|
||||
repubTk: build.Clock.Ticker(time.Duration(build.BlockDelaySecs) * time.Second),
|
||||
localAddrs: make(map[address.Address]struct{}),
|
||||
pending: make(map[address.Address]*msgSet),
|
||||
minGasPrice: types.NewInt(0),
|
||||
@ -973,6 +973,8 @@ func (mp *MessagePool) loadLocal() error {
|
||||
|
||||
log.Errorf("adding local message: %+v", err)
|
||||
}
|
||||
|
||||
mp.localAddrs[sm.Message.From] = struct{}{}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -975,7 +975,7 @@ var clientListDeals = &cli.Command{
|
||||
} else {
|
||||
onChain, err := api.StateMarketStorageDeal(ctx, v.DealID, head.Key())
|
||||
if err != nil {
|
||||
deals = append(deals, deal{ LocalDeal: v, })
|
||||
deals = append(deals, deal{LocalDeal: v})
|
||||
} else {
|
||||
deals = append(deals, deal{
|
||||
LocalDeal: v,
|
||||
|
@ -40,7 +40,7 @@ func (a *GasAPI) GasEstimateFeeCap(ctx context.Context, msg *types.Message, maxq
|
||||
}
|
||||
|
||||
parentBaseFee := ts.Blocks()[0].ParentBaseFee
|
||||
increaseFactor := math.Pow(1+float64(1/build.BaseFeeMaxChangeDenom), float64(maxqueueblks))
|
||||
increaseFactor := math.Pow(1.+1./float64(build.BaseFeeMaxChangeDenom), float64(maxqueueblks))
|
||||
|
||||
feeInFuture := types.BigMul(parentBaseFee, types.NewInt(uint64(increaseFactor*(1<<8))))
|
||||
feeInFuture = types.BigDiv(feeInFuture, types.NewInt(1<<8))
|
||||
|
Loading…
Reference in New Issue
Block a user