From b4c07e1d192e5d4a128c894a2d64c59cc3acc982 Mon Sep 17 00:00:00 2001 From: irrun Date: Thu, 25 Apr 2024 16:49:58 +0800 Subject: [PATCH] feat: set MaxBundleAliveBlock as bundle's default ddl --- internal/ethapi/api_bundle.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/ethapi/api_bundle.go b/internal/ethapi/api_bundle.go index b5937c1d00..5f9e76db2a 100644 --- a/internal/ethapi/api_bundle.go +++ b/internal/ethapi/api_bundle.go @@ -95,6 +95,11 @@ func (s *PrivateTxBundleAPI) SendBundle(ctx context.Context, args types.SendBund RevertingTxHashes: args.RevertingTxHashes, } + // If the maxBlockNumber and maxTimestamp are not set, set max ddl of bundle as MaxBundleAliveBlock + if bundle.MaxBlockNumber == 0 && bundle.MaxTimestamp == 0 { + bundle.MaxBlockNumber = currentHeader.Number.Uint64() + MaxBundleAliveBlock + } + err := s.b.SendBundle(ctx, bundle) if err != nil { return common.Hash{}, err