diff --git a/app/modules/bma/lib/controllers/node.ts b/app/modules/bma/lib/controllers/node.ts index a2edfedaa59453321260e131aa7166196bed3c1d..2bd24394fe1ae7dc7381aff50d29efd87d8dcc88 100644 --- a/app/modules/bma/lib/controllers/node.ts +++ b/app/modules/bma/lib/controllers/node.ts @@ -22,6 +22,12 @@ export class NodeBinding extends AbstractController { software: "duniter", version: this.server.version, 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) + }, }, }; }; diff --git a/app/modules/bma/lib/dtos.ts b/app/modules/bma/lib/dtos.ts index ee187a77e394d4c62c44f8dfa7d61ed63bc4c9a4..d8ed1218605d37ca877ead9cb0de985b922c3e13 100644 --- a/app/modules/bma/lib/dtos.ts +++ b/app/modules/bma/lib/dtos.ts @@ -21,6 +21,10 @@ export const Summary = { software: String, version: String, forkWindowSize: Number, + storage: { + transactions: Boolean, + wotwizard: Boolean, + }, }, }; @@ -29,6 +33,10 @@ export interface HttpSummary { software: string; version: string; forkWindowSize: number; + storage: { + transactions: boolean; + wotwizard: boolean; + }; }; } diff --git a/doc/HTTP_API.md b/doc/HTTP_API.md index 3a5bace82210065faff189686f6cd51b56108b80..e3f91fa08767d70b75f59e80247a1cfa2179f874 100644 --- a/doc/HTTP_API.md +++ b/doc/HTTP_API.md @@ -244,8 +244,12 @@ Technical informations about the node. { "duniter": { "software": "duniter", - "version": "0.10.3", - "forkWindowSize": 10 + "version": "1.8.7", + "forkWindowSize": 100, + "storage": { + "transaction": true, + "wotwizard": false + } } } ``` diff --git a/test/fast/modules/bma/bma-module-test.ts b/test/fast/modules/bma/bma-module-test.ts index 58c20ea81a5824f6a2f6cd3bb8763b962636e08f..cbec2c94aa9dfd871868c9b897b836ac11a5ae9c 100644 --- a/test/fast/modules/bma/bma-module-test.ts +++ b/test/fast/modules/bma/bma-module-test.ts @@ -51,6 +51,8 @@ describe('Module usage', () => { }); should.exist(json); 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 () => {