Show validator address for nodes (#37)

Show validator address for nodes
This commit is contained in:
Maciej Hirsz
2018-09-12 13:55:37 +02:00
committed by GitHub
parent cc6a6cfef6
commit 762db7ebdc
13 changed files with 198 additions and 57 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ interface NodeIdCache {
}
const nextId = idGenerator<Types.NodeId>();
const idCache = new Map<Types.NodePubKey, NodeIdCache>();
const idCache = new Map<Types.Address, NodeIdCache>();
function clearCache() {
const now = timestamp();
@@ -25,7 +25,7 @@ function clearCache() {
clearCache();
export function getId(pubkey: Maybe<Types.NodePubKey>): Types.NodeId {
export function getId(pubkey: Maybe<Types.Address>): Types.NodeId {
if (!pubkey) {
return nextId();
}
@@ -44,7 +44,7 @@ export function getId(pubkey: Maybe<Types.NodePubKey>): Types.NodeId {
return id;
}
export function refreshId(pubkey: Maybe<Types.NodePubKey>, id: Types.NodeId) {
export function refreshId(pubkey: Maybe<Types.Address>, id: Types.NodeId) {
if (!pubkey) {
return;
}