Add dev_getBlockStats RPC (#4677)

* Add dev_getBlockStats RPC

* CHANGELOG
This commit is contained in:
Jaco
2022-03-22 16:18:13 +02:00
committed by GitHub
parent 2b1a7da446
commit 7cd9c16eae
3 changed files with 33 additions and 0 deletions
@@ -14,6 +14,7 @@ export { default as collective } from './collective/definitions';
export { default as consensus } from './consensus/definitions';
export { default as contracts } from './contracts/definitions';
export { default as democracy } from './democracy/definitions';
export { default as dev } from './dev/definitions';
export { default as elections } from './elections/definitions';
export { default as engine } from './engine/definitions';
export { default as evm } from './evm/definitions';
@@ -0,0 +1,31 @@
// Copyright 2017-2022 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// order important in structs... :)
/* eslint-disable sort-keys */
import type { Definitions } from '../../types';
export default {
rpc: {
getBlockStats: {
description: 'Reexecute the specified `block_hash` and gather statistics while doing so',
params: [
{
name: 'at',
type: 'Hash',
isHistoric: true
}
],
type: 'Option<BlockStats>'
}
},
types: {
BlockStats: {
witnessLen: 'u64',
witnessCompactLen: 'u64',
blockLen: 'u64',
blockNumExtrinsics: 'u64'
}
}
} as Definitions;