Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -521,17 +521,10 @@ public long calculateSimulationGasCap(
}
} else {
if (rpcGasCap > 0) {
if (blockGasLimit > 0) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

block gas limit is always greater than zero, the zero case was only there because tests were not setting it

LOG.trace(
"No user provided gas limit, setting simulation gas cap to the value of min(rpc-gas-cap,blockGasLimit) {}",
rpcGasCap);
simulationGasCap = Math.min(rpcGasCap, blockGasLimit);
} else {
LOG.trace(
"No user provided gas limit, setting simulation gas cap to the value of rpc-gas-cap {}",
rpcGasCap);
simulationGasCap = rpcGasCap;
}
LOG.trace(
"No user provided gas limit, setting simulation gas cap to the value of min(rpc-gas-cap,blockGasLimit) {}",
rpcGasCap);
simulationGasCap = Math.min(rpcGasCap, blockGasLimit);
} else {
simulationGasCap = blockGasLimit;
LOG.trace(
Expand Down
Loading
Loading