diff options
| author | LV-426 <lv-426@taproot.org.il> | 2014-11-05 00:38:16 +0200 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2014-11-09 14:56:58 +0200 |
| commit | 82e87d0f203d14097f818f84a27dfc92f267422c (patch) | |
| tree | 8632aecb94dba71b2cfe6916224d44c52a910787 | |
| parent | 54a334b5ae6f8e83d71f1785bb359284d689ca62 (diff) | |
broadcast_possible_next_diff_block():
- announce diff block and await commit/reject consensus
- future protocol stub
- currently simply calls backend
| -rw-r--r-- | scripts/rz_api_mesh.js | 14 |
1 files changed, 13 insertions, 1 deletions
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(); }); |
