Removed auth storage keys (#1030)

* removed auth storage keys

* removed changes on autogenerated files

* re-add deprecated storage methods

* linting

* linting
This commit is contained in:
Stefanie Doll
2019-06-18 16:59:14 +02:00
committed by Jaco Greeff
parent 79361eb398
commit 33fa3c6237
4 changed files with 18 additions and 16 deletions
@@ -7,6 +7,9 @@ import { storage } from './storage';
describe('storage', () => {
it('should return well known keys', () => {
expect(typeof storage.substrate).toBe('object');
// @deprecated: The ':auth:' (authorityPrefix) and ':auth:len' (authorityCount) storage keys
// have been removed in https://github.com/paritytech/substrate/pull/2802
expect(storage.substrate.authorityCount).toBeTruthy();
expect(storage.substrate.authorityPrefix).toBeTruthy();
expect(storage.substrate.changesTrieConfig).toBeTruthy();
@@ -5,6 +5,9 @@
import { authorityCount, authorityPrefix, changesTrieConfig, code, extrinsicIndex, heapPages } from './substrate';
describe('substrate', () => {
// @deprecated: The ':auth:' (authorityPrefix) and ':auth:len' (authorityCount) storage keys
// have been removed in https://github.com/paritytech/substrate/pull/2802
it('authorityCount should return the correct storage key', () => {
expect(authorityCount()).toEqual(Uint8Array.from([36, 58, 97, 117, 116, 104, 58, 108, 101, 110])); // Length-prefixed
});
@@ -30,16 +30,8 @@ const createRuntimeFunction = (method: string, key: string, { documentation, typ
}
);
export const code = createRuntimeFunction('code', ':code', {
documentation: 'Wasm code of the runtime.',
type: 'Bytes'
});
export const heapPages = createRuntimeFunction('heapPages', ':heappages', {
documentation: 'Number of wasm linear memory pages required for execution of the runtime.',
type: 'u64'
});
// @deprecated: The ':auth:' (authorityPrefix) and ':auth:len' (authorityCount) storage keys
// have been removed in https://github.com/paritytech/substrate/pull/2802
export const authorityCount = createRuntimeFunction('authorityCount', ':auth:len', {
documentation: 'Number of authorities.',
type: 'u32'
@@ -50,6 +42,16 @@ export const authorityPrefix = createRuntimeFunction('authorityPrefix', ':auth:'
type: 'u32'
});
export const code = createRuntimeFunction('code', ':code', {
documentation: 'Wasm code of the runtime.',
type: 'Bytes'
});
export const heapPages = createRuntimeFunction('heapPages', ':heappages', {
documentation: 'Number of wasm linear memory pages required for execution of the runtime.',
type: 'u64'
});
export const extrinsicIndex = createRuntimeFunction('extrinsicIndex', ':extrinsic_index', {
documentation: 'Current extrinsic index (u32) is stored under this key.',
type: 'u32'