Skip to content
Snippets Groups Projects
Commit 3b2406ae authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

fix(1441): Add config's storage into BMA /node/summary - close #1441

parent 9af81aec
No related branches found
No related tags found
1 merge request!1431fix(1441): Add config's storage into BMA /node/summary - close #1441
...@@ -22,6 +22,12 @@ export class NodeBinding extends AbstractController { ...@@ -22,6 +22,12 @@ export class NodeBinding extends AbstractController {
software: "duniter", software: "duniter",
version: this.server.version, version: this.server.version,
forkWindowSize: this.server.conf.forksize, forkWindowSize: this.server.conf.forksize,
storage: {
transactions: this.server.conf.storage
? this.server.conf.storage.transactions
: true, // true by default (see app/module/config.ts)
wotwizard: this.server.conf.storage?.wotwizard || false, // false by default (see app/module/config.ts)
},
}, },
}; };
}; };
......
...@@ -21,6 +21,10 @@ export const Summary = { ...@@ -21,6 +21,10 @@ export const Summary = {
software: String, software: String,
version: String, version: String,
forkWindowSize: Number, forkWindowSize: Number,
storage: {
transactions: Boolean,
wotwizard: Boolean,
},
}, },
}; };
...@@ -29,6 +33,10 @@ export interface HttpSummary { ...@@ -29,6 +33,10 @@ export interface HttpSummary {
software: string; software: string;
version: string; version: string;
forkWindowSize: number; forkWindowSize: number;
storage: {
transactions: boolean;
wotwizard: boolean;
};
}; };
} }
......
...@@ -244,8 +244,12 @@ Technical informations about the node. ...@@ -244,8 +244,12 @@ Technical informations about the node.
{ {
"duniter": { "duniter": {
"software": "duniter", "software": "duniter",
"version": "0.10.3", "version": "1.8.7",
"forkWindowSize": 10 "forkWindowSize": 100,
"storage": {
"transaction": true,
"wotwizard": false
}
} }
} }
``` ```
......
...@@ -51,6 +51,8 @@ describe('Module usage', () => { ...@@ -51,6 +51,8 @@ describe('Module usage', () => {
}); });
should.exist(json); should.exist(json);
json.should.have.property('duniter').property('software').equal('duniter'); json.should.have.property('duniter').property('software').equal('duniter');
json.should.have.property('duniter').property('storage').property('transactions').equal(true);
json.should.have.property('duniter').property('storage').property('wotwizard').equal(false);
}) })
it('remoteipv4 should NOT be filled if remote Host is declared', async () => { it('remoteipv4 should NOT be filled if remote Host is declared', async () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment