From 82e87d0f203d14097f818f84a27dfc92f267422c Mon Sep 17 00:00:00 2001 From: LV-426 Date: Wed, 5 Nov 2014 00:38:16 +0200 Subject: broadcast_possible_next_diff_block(): - announce diff block and await commit/reject consensus - future protocol stub - currently simply calls backend --- scripts/rz_api_mesh.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/rz_api_mesh.js b/scripts/rz_api_mesh.js index 3fba4aef..5ffe7b76 100644 --- a/scripts/rz_api_mesh.js +++ b/scripts/rz_api_mesh.js @@ -1,9 +1,21 @@ /** * API calls designed to execute in decentralized fashion */ -define([], function() { +define(['rz_api_backend'], function(rz_api_backend) { function RZ_API_Mesh() { + /** + * suggest diff block and await commit/reject consensus + */ + // @ajax-trans + this.broadcast_possible_next_diff_block = function (diff_set) { + + function on_success(data){ + // TODO impl + } + + rz_api_backend.commit_diff_set(diff_set); + } } return new RZ_API_Mesh(); }); -- cgit v1.3.1