Add ValidatorId (#1098)

* Add ValidatorId

* Bump metadata
This commit is contained in:
Jaco Greeff
2019-07-10 15:15:05 +02:00
committed by GitHub
parent c3aed06a89
commit f5f5830bc5
5 changed files with 31 additions and 38 deletions
@@ -710,7 +710,7 @@
"name": "Validators",
"modifier": "Default",
"type": {
"PlainType": "Vec<AccountId>"
"PlainType": "Vec<ValidatorId>"
},
"fallback": "0x00",
"documentation": [
@@ -739,24 +739,6 @@
" True if anything has changed in this session."
]
},
{
"name": "NextKeyFor",
"modifier": "Optional",
"type": {
"MapType": {
"hasher": "Blake2_256",
"key": "AccountId",
"value": "Keys",
"isLinked": false
}
},
"fallback": "0x00",
"documentation": [
" The next key to be used for a given validator. At the end of the session, they",
" will be moved into the `QueuedKeys` and so changes here will not take effect for",
" at least one whole session."
]
},
{
"name": "QueuedChanged",
"modifier": "Default",
@@ -772,29 +754,13 @@
"name": "QueuedKeys",
"modifier": "Default",
"type": {
"PlainType": "Vec<(AccountId,Keys)>"
"PlainType": "Vec<(ValidatorId,Keys)>"
},
"fallback": "0x00",
"documentation": [
" The queued keys for the next session. When the next session begins, these keys",
" will be used to determine the validator's session keys."
]
},
{
"name": "Active",
"modifier": "Default",
"type": {
"MapType": {
"hasher": "Blake2_256",
"key": "u32",
"value": "Vec<OpaqueKey>",
"isLinked": false
}
},
"fallback": "0x00",
"documentation": [
" The keys that are currently active."
]
}
],
"calls": [
@@ -818,7 +784,7 @@
" The dispatch origin of this function must be signed.",
"",
" # <weight>",
" - O(1).",
" - O(log n) in number of accounts.",
" - One extra DB entry.",
" # </weight>"
]
@@ -1106,6 +1072,17 @@
"documentation": [
" True if the next session change will be a new era regardless of index."
]
},
{
"name": "BondedEras",
"modifier": "Default",
"type": {
"PlainType": "Vec<(EraIndex,SessionIndex)>"
},
"fallback": "0x00",
"documentation": [
" A mapping from still-bonded eras to the first session index of that era."
]
}
],
"calls": [
File diff suppressed because one or more lines are too long
+14
View File
@@ -0,0 +1,14 @@
// Copyright 2017-2019 @polkadot/types authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import AccountId from '../primitive/AccountId';
/**
* @name ValidatorId
* @description Wrapper for a ValidatorId. Same as an normal AccountId, i.e. a wrapper
* around publicKey, however specialized since it specifically points to
* an authority.
*/
export default class ValidatorId extends AccountId {
}
+1
View File
@@ -76,6 +76,7 @@ export { default as TreasuryProposal } from './TreasuryProposal';
export { default as UncleEntryItem } from './UncleEntryItem';
export { default as UnlockChunk } from './UnlockChunk';
export { default as UpwardMessage, ParachainDispatchOrigin } from './UpwardMessage';
export { default as ValidatorId } from './ValidatorId';
export { default as ValidatorPrefs } from './ValidatorPrefs';
export { default as VestingSchedule } from './VestingSchedule';
export { default as Vote } from './Vote';