Skip to content

Commit

Permalink
feat: set MaxBundleAliveBlock as bundle's default ddl
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun committed Apr 25, 2024
1 parent 2d83277 commit b4c07e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/ethapi/api_bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b4c07e1

Please sign in to comment.