Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdiallam committed Aug 30, 2024
1 parent 4249e61 commit 2657e38
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/types/transaction_conditional.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type TransactionConditional struct {
// KnownAccounts represents account prestate conditions
KnownAccounts KnownAccounts `json:"knownAccounts"`

// Header state conditionals
// Header state conditionals (inclusive ranges)
BlockNumberMin *big.Int `json:"blockNumberMin,omitempty"`
BlockNumberMax *big.Int `json:"blockNumberMax,omitempty"`
TimestampMin *uint64 `json:"timestampMin,omitempty"`
Expand Down
7 changes: 6 additions & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,12 @@ func (s *Ethereum) APIs() []rpc.API {

// Append any Sequencer APIs as enabled
if s.config.RollupSequencerEnableTxConditional {
apis = append(apis, sequencerapi.GetSendRawTxConditionalAPI(s.APIBackend))
// an effort to detect if running in a non-sequencer mode
if len(s.config.RollupSequencerHTTP) > 0 {
log.Warn("SendRawTransactionConditional enabled when RollupSequencerHTTP is defined. Skipping...")
} else {
apis = append(apis, sequencerapi.GetSendRawTxConditionalAPI(s.APIBackend))
}
}

// Append all the local APIs and return
Expand Down
2 changes: 1 addition & 1 deletion eth/ethconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,12 @@ type Config struct {
ApplySuperchainUpgrades bool `toml:",omitempty"`

RollupSequencerHTTP string
RollupSequencerEnableTxConditional bool
RollupHistoricalRPC string
RollupHistoricalRPCTimeout time.Duration
RollupDisableTxPoolGossip bool
RollupDisableTxPoolAdmission bool
RollupHaltOnIncompatibleProtocolVersion string
RollupSequencerEnableTxConditional bool
}

// CreateConsensusEngine creates a consensus engine for the given chain config.
Expand Down

0 comments on commit 2657e38

Please sign in to comment.