mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-13 01:01:02 +00:00
Move address to end in nodeDetails (#149)
This makes the backend backwards compatible with frontends which still have an old version of nodeDetails.
This commit is contained in:
committed by
Maciej Hirsz
parent
35a853a64b
commit
26000f3e8a
@@ -198,7 +198,7 @@ export default class Node {
|
||||
const authority = this.authority ? this.address : null;
|
||||
const addr = this.address ? this.address : '' as Types.Address;
|
||||
|
||||
return [this.name, addr, this.implementation, this.version, authority, this.networkId];
|
||||
return [this.name, this.implementation, this.version, authority, this.networkId, addr];
|
||||
}
|
||||
|
||||
public nodeStats(): Types.NodeStats {
|
||||
|
||||
@@ -9,4 +9,4 @@ import * as FeedMessage from './feed';
|
||||
export { Types, FeedMessage };
|
||||
|
||||
// Increment this if breaking changes were made to types in `feed.ts`
|
||||
export const VERSION: Types.FeedVersion = 23 as Types.FeedVersion;
|
||||
export const VERSION: Types.FeedVersion = 24 as Types.FeedVersion;
|
||||
|
||||
@@ -27,7 +27,7 @@ export type NetworkId = Opaque<string, 'NetworkId'>;
|
||||
export type NetworkState = Opaque<string | object, 'NetworkState'>;
|
||||
|
||||
export type BlockDetails = [BlockNumber, BlockHash, Milliseconds, Timestamp, Maybe<PropagationTime>];
|
||||
export type NodeDetails = [NodeName, Address, NodeImplementation, NodeVersion, Maybe<Address>, Maybe<NetworkId>];
|
||||
export type NodeDetails = [NodeName, NodeImplementation, NodeVersion, Maybe<Address>, Maybe<NetworkId>, Address];
|
||||
export type NodeStats = [PeerCount, TransactionCount];
|
||||
export type NodeHardware = [Array<MemoryUse>, Array<CPUUse>, Array<BytesPerSecond>, Array<BytesPerSecond>, Array<Timestamp>];
|
||||
export type NodeLocation = [Latitude, Longitude, City];
|
||||
|
||||
@@ -60,7 +60,7 @@ export class Node {
|
||||
blockDetails: Types.BlockDetails,
|
||||
location: Maybe<Types.NodeLocation>
|
||||
) {
|
||||
const [name, address, implementation, version, validator, networkId] = nodeDetails;
|
||||
const [name, implementation, version, validator, networkId, address] = nodeDetails;
|
||||
|
||||
this.pinned = pinned;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user