mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
F
This commit is contained in:
parent
4cca5c0749
commit
6d74d08883
2 changed files with 11 additions and 11 deletions
|
|
@ -1331,6 +1331,10 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs, overrid
|
||||||
return nil, errors.New("bundle txs and block numbers mismatch")
|
return nil, errors.New("bundle txs and block numbers mismatch")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(args.Timestamps) != len(args.Transactions) {
|
||||||
|
return nil, errors.New("bundle txs and timestamps mismatch")
|
||||||
|
}
|
||||||
|
|
||||||
defer func(start time.Time) { log.Debug("Executing EVM call finished", "runtime", time.Since(start)) }(time.Now())
|
defer func(start time.Time) { log.Debug("Executing EVM call finished", "runtime", time.Since(start)) }(time.Now())
|
||||||
|
|
||||||
timeoutMilliSeconds := int64(5000)
|
timeoutMilliSeconds := int64(5000)
|
||||||
|
|
@ -1347,10 +1351,6 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs, overrid
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
timestamp := parent.Time + 1
|
|
||||||
if args.Timestamp != nil {
|
|
||||||
timestamp = *args.Timestamp
|
|
||||||
}
|
|
||||||
coinbase := parent.Coinbase
|
coinbase := parent.Coinbase
|
||||||
if args.Coinbase != nil {
|
if args.Coinbase != nil {
|
||||||
coinbase = common.HexToAddress(*args.Coinbase)
|
coinbase = common.HexToAddress(*args.Coinbase)
|
||||||
|
|
@ -1398,7 +1398,7 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs, overrid
|
||||||
ParentHash: parent.Hash(),
|
ParentHash: parent.Hash(),
|
||||||
Number: big.NewInt(int64(args.BlockNumbers[i])),
|
Number: big.NewInt(int64(args.BlockNumbers[i])),
|
||||||
GasLimit: gasLimit,
|
GasLimit: gasLimit,
|
||||||
Time: timestamp,
|
Time: args.Timestamps[i],
|
||||||
Difficulty: difficulty,
|
Difficulty: difficulty,
|
||||||
Coinbase: coinbase,
|
Coinbase: coinbase,
|
||||||
BaseFee: baseFee,
|
BaseFee: baseFee,
|
||||||
|
|
@ -1471,6 +1471,10 @@ func doCallBundle(ctx context.Context, b Backend, chain *core.BlockChain, args C
|
||||||
return nil, errors.New("bundle txs and block numbers mismatch")
|
return nil, errors.New("bundle txs and block numbers mismatch")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(args.Timestamps) != len(args.Transactions) {
|
||||||
|
return nil, errors.New("bundle txs and timestamps mismatch")
|
||||||
|
}
|
||||||
|
|
||||||
defer func(start time.Time) { log.Debug("Executing EVM call finished", "runtime", time.Since(start)) }(time.Now())
|
defer func(start time.Time) { log.Debug("Executing EVM call finished", "runtime", time.Since(start)) }(time.Now())
|
||||||
|
|
||||||
timeoutMilliSeconds := int64(5000)
|
timeoutMilliSeconds := int64(5000)
|
||||||
|
|
@ -1487,10 +1491,6 @@ func doCallBundle(ctx context.Context, b Backend, chain *core.BlockChain, args C
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
timestamp := parent.Time + 1
|
|
||||||
if args.Timestamp != nil {
|
|
||||||
timestamp = *args.Timestamp
|
|
||||||
}
|
|
||||||
coinbase := parent.Coinbase
|
coinbase := parent.Coinbase
|
||||||
if args.Coinbase != nil {
|
if args.Coinbase != nil {
|
||||||
coinbase = common.HexToAddress(*args.Coinbase)
|
coinbase = common.HexToAddress(*args.Coinbase)
|
||||||
|
|
@ -1539,7 +1539,7 @@ func doCallBundle(ctx context.Context, b Backend, chain *core.BlockChain, args C
|
||||||
ParentHash: parent.Hash(),
|
ParentHash: parent.Hash(),
|
||||||
Number: big.NewInt(int64(args.BlockNumbers[i])),
|
Number: big.NewInt(int64(args.BlockNumbers[i])),
|
||||||
GasLimit: gasLimit,
|
GasLimit: gasLimit,
|
||||||
Time: timestamp,
|
Time: args.Timestamps[i],
|
||||||
Difficulty: difficulty,
|
Difficulty: difficulty,
|
||||||
Coinbase: coinbase,
|
Coinbase: coinbase,
|
||||||
BaseFee: baseFee,
|
BaseFee: baseFee,
|
||||||
|
|
|
||||||
|
|
@ -73,9 +73,9 @@ type MaxWalletSearchArgs struct {
|
||||||
type CallBundleArgs struct {
|
type CallBundleArgs struct {
|
||||||
Transactions []TransactionArgs `json:"transactions"`
|
Transactions []TransactionArgs `json:"transactions"`
|
||||||
BlockNumbers []rpc.BlockNumber `json:"blockNumbers"`
|
BlockNumbers []rpc.BlockNumber `json:"blockNumbers"`
|
||||||
|
Timestamps []uint64 `json:"timestamps"`
|
||||||
StateBlockNumberOrHash rpc.BlockNumberOrHash `json:"stateBlockNumber"`
|
StateBlockNumberOrHash rpc.BlockNumberOrHash `json:"stateBlockNumber"`
|
||||||
Coinbase *string `json:"coinbase"`
|
Coinbase *string `json:"coinbase"`
|
||||||
Timestamp *uint64 `json:"timestamp"`
|
|
||||||
Timeout *int64 `json:"timeout"`
|
Timeout *int64 `json:"timeout"`
|
||||||
GasLimit *uint64 `json:"gasLimit"`
|
GasLimit *uint64 `json:"gasLimit"`
|
||||||
Difficulty *big.Int `json:"difficulty"`
|
Difficulty *big.Int `json:"difficulty"`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue