Patch for concurrent iterator & others (onto v1.11.6) #386

Closed
roysc wants to merge 1565 commits from v1.11.6-statediff-v5 into master
Showing only changes of commit c63c2d855e - Show all commits

View File

@ -229,13 +229,13 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
if opts.GasPrice != nil && (opts.GasFeeCap != nil || opts.GasTipCap != nil) { if opts.GasPrice != nil && (opts.GasFeeCap != nil || opts.GasTipCap != nil) {
return nil, errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified") return nil, errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified")
} }
head, err := c.transactor.HeaderByNumber(opts.Context, nil) head, err := c.transactor.HeaderByNumber(ensureContext(opts.Context), nil)
if err != nil { if err != nil {
return nil, err return nil, err
} }
if head.BaseFee != nil && opts.GasPrice == nil { if head.BaseFee != nil && opts.GasPrice == nil {
if opts.GasTipCap == nil { if opts.GasTipCap == nil {
tip, err := c.transactor.SuggestGasTipCap(opts.Context) tip, err := c.transactor.SuggestGasTipCap(ensureContext(opts.Context))
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -256,7 +256,7 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
return nil, errors.New("maxFeePerGas or maxPriorityFeePerGas specified but london is not active yet") return nil, errors.New("maxFeePerGas or maxPriorityFeePerGas specified but london is not active yet")
} }
if opts.GasPrice == nil { if opts.GasPrice == nil {
price, err := c.transactor.SuggestGasTipCap(opts.Context) price, err := c.transactor.SuggestGasTipCap(ensureContext(opts.Context))
if err != nil { if err != nil {
return nil, err return nil, err
} }