mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
finally
This commit is contained in:
parent
f6806b2b04
commit
86750e5d4f
1 changed files with 4 additions and 13 deletions
|
|
@ -59,15 +59,6 @@ func NewBundleAPI(b Backend, chain *core.BlockChain) *BundleAPI {
|
|||
return &BundleAPI{b, chain}
|
||||
}
|
||||
|
||||
func (s *BlockChainAPI) CallNew(ctx context.Context, args TransactionArgsBundle, blockNrOrHash rpc.BlockNumberOrHash, overrides *StateOverride, blockOverrides *BlockOverrides) (map[string]interface{}, error) {
|
||||
result, err := DoCallBundle(ctx, s.b, args, blockNrOrHash, overrides, blockOverrides, s.b.RPCEVMTimeout(), s.b.RPCGasCap())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs, overrides *StateOverride) (map[string]interface{}, error) {
|
||||
if len(args.Transactions) == 0 {
|
||||
return nil, errors.New("bundle missing txs")
|
||||
|
|
@ -113,7 +104,7 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs, overrid
|
|||
if args.BaseFee != nil {
|
||||
baseFee = args.BaseFee
|
||||
} else if s.b.ChainConfig().IsLondon(big.NewInt(args.BlockNumbers[0].Int64())) {
|
||||
baseFee = misc.CalcBaseFee(s.b.ChainConfig(), parent)
|
||||
baseFee = eip1559.CalcBaseFee(s.b.ChainConfig(), parent)
|
||||
}
|
||||
|
||||
// Setup context so it may be cancelled the call has completed
|
||||
|
|
@ -253,7 +244,7 @@ func doCallBundle(ctx context.Context, b Backend, chain *core.BlockChain, args C
|
|||
if args.BaseFee != nil {
|
||||
baseFee = args.BaseFee
|
||||
} else if b.ChainConfig().IsLondon(big.NewInt(args.BlockNumbers[0].Int64())) {
|
||||
baseFee = misc.CalcBaseFee(b.ChainConfig(), parent)
|
||||
baseFee = eip1559.CalcBaseFee(b.ChainConfig(), parent)
|
||||
}
|
||||
|
||||
// Setup context so it may be cancelled the call has completed
|
||||
|
|
|
|||
Loading…
Reference in a new issue