diff --git a/core/types/bundle.go b/core/types/bundle.go index 203c7c1f05..c691ab2a1b 100644 --- a/core/types/bundle.go +++ b/core/types/bundle.go @@ -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"` diff --git a/internal/ethapi/api_bundle.go b/internal/ethapi/api_bundle.go index 7bb28a2639..441345f9b6 100644 --- a/internal/ethapi/api_bundle.go +++ b/internal/ethapi/api_bundle.go @@ -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")) } @@ -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,