Skip to content

Commit

Permalink
Stop using mainnet block gas limit on testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed Jan 31, 2024
1 parent bc844b7 commit 7b5032e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/1215.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Stop using mainnet block gas limit on testnet
2 changes: 1 addition & 1 deletion src/app/components/Blocks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const Blocks: FC<BlocksProps> = ({
]

const tableRows = blocks?.map(block => {
const blockGasLimit = paraTimesConfig[block.layer]?.mainnet.blockGasLimit
const blockGasLimit = paraTimesConfig[block.layer]?.[block.network]?.blockGasLimit
if (!blockGasLimit) throw new Error('blockGasLimit is not configured')
return {
key: block.hash,
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/BlockDetailPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const BlockDetailView: FC<{

const transactionsAnchor = `${RouteUtils.getBlockRoute(block, block.round)}#${transactionsContainerId}`
const transactionLabel = block.num_transactions.toLocaleString()
const blockGasLimit = paraTimesConfig[block.layer]?.mainnet.blockGasLimit
const blockGasLimit = paraTimesConfig[block.layer]?.[block.network]?.blockGasLimit
if (!blockGasLimit) throw new Error('blockGasLimit is not configured')
return (
<StyledDescriptionList
Expand Down

0 comments on commit 7b5032e

Please sign in to comment.