Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <[email protected]>
  • Loading branch information
fab-10 committed Apr 10, 2024
1 parent 1af5505 commit e398ff3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
14 changes: 8 additions & 6 deletions PLUGINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ of a transaction.

#### CLI Options

| Option Name | Default Value | Command Line Argument |
|----------------------------------|----------------------|---------------------------------------------------|
| MAX_BLOCK_CALLDATA_SIZE | 70000 | `--plugin-linea-max-block-calldata-size` |
| MODULE_LIMIT_FILE_PATH | moduleLimitFile.toml | `--plugin-linea-module-limit-file-path` |
| OVER_LINE_COUNT_LIMIT_CACHE_SIZE | 10_000 | `--plugin-linea-over-line-count-limit-cache-size` |
| MAX_GAS_PER_BLOCK | 30_000_000L | `--plugin-linea-max-block-gas` |
| Option Name | Default Value | Command Line Argument |
|-------------------------------------|----------------------|-------------------------------------------------------|
| MAX_BLOCK_CALLDATA_SIZE | 70000 | `--plugin-linea-max-block-calldata-size` |
| MODULE_LIMIT_FILE_PATH | moduleLimitFile.toml | `--plugin-linea-module-limit-file-path` |
| OVER_LINE_COUNT_LIMIT_CACHE_SIZE | 10_000 | `--plugin-linea-over-line-count-limit-cache-size` |
| MAX_GAS_PER_BLOCK | 30_000_000L | `--plugin-linea-max-block-gas` |
| TX_POOL_ENABLE_SIMULATION_CHECK_API | true | `--plugin-linea-tx-pool-simulation-check-api-enabled` |
| TX_POOL_ENABLE_SIMULATION_CHECK_P2P | false | `--plugin-linea-tx-pool-simulation-check-p2p-enabled` |


### Transaction validation - LineaTransactionValidatorPlugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ public SimulationValidator(
public Optional<String> validateTransaction(
final Transaction transaction, final boolean isLocal, final boolean hasPriority) {

if ((isLocal && txPoolValidatorConf.txPoolSimulationCheckApiEnabled())
|| (!isLocal && txPoolValidatorConf.txPoolSimulationCheckP2pEnabled())) {
final boolean isLocalAndApiEnabled =
isLocal && txPoolValidatorConf.txPoolSimulationCheckApiEnabled();
final boolean isRemoteAndP2pEnabled =
!isLocal && txPoolValidatorConf.txPoolSimulationCheckP2pEnabled();
if (isRemoteAndP2pEnabled || isLocalAndApiEnabled) {

final ModuleLineCountValidator moduleLineCountValidator =
new ModuleLineCountValidator(moduleLineLimitsMap);
Expand Down

0 comments on commit e398ff3

Please sign in to comment.