Add dev_getBlockStats RPC (#4677)
* Add dev_getBlockStats RPC * CHANGELOG
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user