Skip to content

Commit

Permalink
fix rollme
Browse files Browse the repository at this point in the history
fix api version
full regression test
  • Loading branch information
wirwolf committed Oct 25, 2020
1 parent 6868034 commit 184ee53
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .helm/stake-defender-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
annotations:
rollme: { { randAlphaNum 5 | quote } }
rollme: {{ randAlphaNum 5 | quote }}
spec:
imagePullSecrets:
- name: {{ .Values.image.secret }}
Expand Down
1 change: 0 additions & 1 deletion docker-compose-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ services:
- ~/.cache/yarn:/home/node/.cache/yarn:rw

redis:
container_name: ${PROJECT_NAME}_redis
image: redis:4
volumes:
- redis_data:/data/:rw
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/Monitoring/Modules/SplashChecker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export class SplashChecker {
let block: BlockInfoInterface;
[validators, block] = data;
let isValidator = validators.find( (item) => {
return item.pub_key === this.config.publicKeyValidator;
return item.public_key === this.config.publicKeyValidator;
});
if (isValidator !== undefined) {
let isSign = block.validators.find((item) => {
return item.pub_key === this.config.publicKeyValidator && item.signed === true;
return item.public_key === this.config.publicKeyValidator && item.signed === true;
});
if (isSign === undefined) {
BlockStorage.addBlock(parseInt(block.height), block.hash, true);
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/NodeApi/Interfaces/InfoInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ interface StakeItem {
}

export interface ValidatorItemInterface {
pub_key: string;
public_key: string;
voting_power: string;
}

Expand All @@ -119,7 +119,7 @@ export interface BlockInfoInterface {
size: string;
proposer: string;
transactions: TransactionItem[];
validators: {pub_key: string, signed:boolean}[];
validators: {public_key: string, signed:boolean}[];
}

interface TransactionItem {
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/NodeApi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class NodeApi {
if (response === false) {
reject('Response is false');
}
resolve(response.data);
resolve(response.data.validators);
})
.catch((err) => {
Core.error('Can not get validators list from node', err.message, 'NodeApi');
Expand All @@ -164,7 +164,7 @@ export class NodeApi {

public async getBlock(height: number): Promise<BlockInfoInterface> {
return new Promise<BlockInfoInterface>((resolve, reject) => {
this.request('/block?height=' + height)
this.request('/block/' + height)
.then((response) => {
if (response === false) {
reject('Response is false');
Expand Down

0 comments on commit 184ee53

Please sign in to comment.