Skip to content

Commit

Permalink
fix: ut
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun committed Mar 12, 2024
1 parent 732993e commit 641ddcd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions core/types/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/rpc"
)

// SendBundleArgs represents the arguments for a call.
type SendBundleArgs struct {
Txs []hexutil.Bytes `json:"txs"`
MaxBlockNumber rpc.BlockNumber `json:"maxBlockNumber"`
MaxBlockNumber uint64 `json:"maxBlockNumber"`
MinTimestamp *uint64 `json:"minTimestamp"`
MaxTimestamp *uint64 `json:"maxTimestamp"`
RevertingTxHashes []common.Hash `json:"revertingTxHashes"`
Expand Down
4 changes: 2 additions & 2 deletions internal/ethapi/api_bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (s *PrivateTxBundleAPI) SendBundle(ctx context.Context, args *types.SendBun
args.MaxTimestamp = &maxTimeStamp
}

if args.MaxBlockNumber != 0 && args.MaxBlockNumber.Int64() > currentHeader.Number.Int64()+MaxBundleAliveBlock {
if args.MaxBlockNumber != 0 && args.MaxBlockNumber > currentHeader.Number.Uint64()+MaxBundleAliveBlock {
return newBundleError(errors.New("the maxBlockNumber should not be lager than currentBlockNum + 100"))
}

Expand Down Expand Up @@ -88,7 +88,7 @@ func (s *PrivateTxBundleAPI) SendBundle(ctx context.Context, args *types.SendBun

bundle := &types.Bundle{
Txs: txs,
MaxBlockNumber: uint64(args.MaxBlockNumber),
MaxBlockNumber: args.MaxBlockNumber,
MinTimestamp: minTimestamp,
MaxTimestamp: maxTimestamp,
RevertingTxHashes: args.RevertingTxHashes,
Expand Down

0 comments on commit 641ddcd

Please sign in to comment.