Skip to content
Snippets Groups Projects
Commit bbd41f33 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] Rename "onPluggedDALExecute" to "onDatabaseExecute"

parent 57df1d34
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ module.exports = {
cli: [{
name: 'start',
desc: 'Start Duniter node daemon.',
onPluggedDALExecute: (server, conf, program, params, startServices) => co(function*() {
onDatabaseExecute: (server, conf, program, params, startServices) => co(function*() {
const logger = server.logger;
logger.info(">> Server starting...");
......
......@@ -10,7 +10,7 @@ module.exports = {
name: 'export-bc [upto]',
desc: 'Exports the whole blockchain as JSON array, up to [upto] block number (excluded).',
logs: false,
onPluggedDALExecute: (server, conf, program, params) => co(function*() {
onDatabaseExecute: (server, conf, program, params) => co(function*() {
const upto = params[0];
const logger = server.logger;
try {
......
......@@ -18,7 +18,7 @@ module.exports = {
cli: [{
name: 'gen-next [host] [port] [difficulty]',
desc: 'Tries to generate the next block of the blockchain.',
onPluggedDALExecute: (server, conf, program, params) => co(function*() {
onDatabaseExecute: (server, conf, program, params) => co(function*() {
const host = params[0];
const port = params[1];
const difficulty = params[2];
......@@ -27,7 +27,7 @@ module.exports = {
}, {
name: 'gen-root [host] [port] [difficulty]',
desc: 'Tries to generate root block, with choice of root members.',
onPluggedDALExecute: (server, conf, program, params, startServices, stopServices) => co(function*() {
onDatabaseExecute: (server, conf, program, params, startServices, stopServices) => co(function*() {
const host = params[0];
const port = params[1];
const difficulty = params[2];
......
......@@ -13,7 +13,7 @@ module.exports = {
cli: [{
name: 'peer [host] [port]',
desc: 'Exchange peerings with another node',
onPluggedDALExecute: (server, conf, program, params) => co(function*() {
onDatabaseExecute: (server, conf, program, params) => co(function*() {
const host = params[0];
const port = params[1];
const logger = server.logger;
......
......@@ -7,7 +7,7 @@ module.exports = {
cli: [{
name: 'reapply-to [number]',
desc: 'Reapply reverted blocks until block #[number] is reached. EXPERIMENTAL',
onPluggedDALExecute: (server, conf, program, params) => co(function*() {
onDatabaseExecute: (server, conf, program, params) => co(function*() {
const number = params[0];
const logger = server.logger;
try {
......
......@@ -7,7 +7,7 @@ module.exports = {
cli: [{
name: 'revert [count]',
desc: 'Revert (undo + remove) the top [count] blocks from the blockchain. EXPERIMENTAL',
onPluggedDALExecute: (server, conf, program, params) => co(function*() {
onDatabaseExecute: (server, conf, program, params) => co(function*() {
const count = params[0];
const logger = server.logger;
try {
......@@ -23,7 +23,7 @@ module.exports = {
},{
name: 'revert-to [number]',
desc: 'Revert (undo + remove) top blockchain blocks until block #[number] is reached. EXPERIMENTAL',
onPluggedDALExecute: (server, conf, program, params) => co(function*() {
onDatabaseExecute: (server, conf, program, params) => co(function*() {
const number = params[0];
const logger = server.logger;
try {
......
......@@ -7,7 +7,7 @@ module.exports = {
cli: [{
name: 'sync [host] [port] [to]',
desc: 'Synchronize blockchain from a remote Duniter node',
onPluggedDALExecute: (server, conf, program, params) => co(function*() {
onDatabaseExecute: (server, conf, program, params) => co(function*() {
const host = params[0];
const port = params[1];
const to = params[2];
......
......@@ -263,7 +263,7 @@ function Stack(dependencies) {
}
}
return yield command.onPluggedDALExecute(server, conf, program, params,
return yield command.onDatabaseExecute(server, conf, program, params,
// Start services and streaming between them
() => co(function*() {
......
......@@ -160,7 +160,7 @@ function Node (dbName, options) {
cli: [{
name: 'execute',
desc: 'Unit Test execution',
onPluggedDALExecute: (server, conf, program, params, startServices) => co(function*() {
onDatabaseExecute: (server, conf, program, params, startServices) => co(function*() {
yield startServices();
callback(null, server);
yield Promise.resolve((res) => null); // Never ending
......
......@@ -88,7 +88,7 @@ describe("v1.0 Module API", () => {
cli: [{
name: 'gimme-conf',
desc: 'Returns the configuration object.',
onPluggedDALExecute: (server, conf, program, params, startServices, stopServices) => co(function*() {
onDatabaseExecute: (server, conf, program, params, startServices, stopServices) => co(function*() {
// Gimme the conf!
return conf;
})
......@@ -177,7 +177,7 @@ describe("v1.0 Module API", () => {
cli: [{
name: 'hello-service',
desc: 'Says hello to the world, at service phase. And feed INPUT with a transaction.',
onPluggedDALExecute: (duniterServer, conf, program, programArgs, startServices, stopServices) => co(function*(){
onDatabaseExecute: (duniterServer, conf, program, programArgs, startServices, stopServices) => co(function*(){
yield startServices();
fakeI.push("Version: 10\n" +
"Type: Transaction\n" +
......@@ -211,7 +211,7 @@ describe("v1.0 Module API", () => {
cli: [{
name: 'bye-service',
desc: 'Says goodbye to the world, at service phase.',
onPluggedDALExecute: (duniterServer, conf, program, programArgs, startServices, stopServices) => co(function*(){
onDatabaseExecute: (duniterServer, conf, program, programArgs, startServices, stopServices) => co(function*(){
yield stopServices();
return Promise.resolve();
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment