Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Oct 1, 2024
1 parent 3129819 commit 68fa6a7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/core/src/rpc/dev/new-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,8 @@ export interface NewBlockParams {
* ```
*/
export const dev_newBlock = async (context: Context, [params]: [NewBlockParams]) => {
const {
count, to, hrmp, ump, dmp, transactions, unsafeBlockHeight, relayChainStateOverrides, relayParentNumber
} = schema.parse(
params || {},
)
const { count, to, hrmp, ump, dmp, transactions, unsafeBlockHeight, relayChainStateOverrides, relayParentNumber } =
schema.parse(params || {})
const now = context.chain.head.number
const diff = to ? to - now : count
const finalCount = diff !== undefined ? Math.max(diff, 1) : 1
Expand Down

0 comments on commit 68fa6a7

Please sign in to comment.