commit b0cda372fb2412459e0462c18b4e9f70ca7992ab
parent 84ef72f38aaee90296442f1ecef81b0724fb7a32
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 12 Apr 2022 22:28:15 +0200
-implement #7061::18861
Diffstat:
3 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/reducer/anastasis_api_backup_redux.c b/src/reducer/anastasis_api_backup_redux.c
@@ -244,6 +244,11 @@ ANASTASIS_backup_start (const struct GNUNET_CONFIGURATION_Handle *cfg)
initial_state = ANASTASIS_REDUX_load_continents_ ();
if (NULL == initial_state)
return NULL;
+ GNUNET_assert (
+ 0 ==
+ json_object_set_new (initial_state,
+ "reducer_type",
+ json_string ("backup")));
set_state (initial_state,
ANASTASIS_BACKUP_STATE_CONTINENT_SELECTING);
return initial_state;
diff --git a/src/reducer/anastasis_api_recovery_redux.c b/src/reducer/anastasis_api_recovery_redux.c
@@ -151,6 +151,11 @@ ANASTASIS_recovery_start (const struct GNUNET_CONFIGURATION_Handle *cfg)
initial_state = ANASTASIS_REDUX_load_continents_ ();
if (NULL == initial_state)
return NULL;
+ GNUNET_assert (
+ 0 ==
+ json_object_set_new (initial_state,
+ "reducer_type",
+ json_string ("recovery")));
set_state (initial_state,
ANASTASIS_RECOVERY_STATE_CONTINENT_SELECTING);
return initial_state;
diff --git a/src/reducer/anastasis_api_redux.c b/src/reducer/anastasis_api_redux.c
@@ -311,6 +311,8 @@ ANASTASIS_redux_fail_ (ANASTASIS_ActionCallback cb,
GNUNET_JSON_pack_allow_null (
GNUNET_JSON_pack_string ("detail",
detail)),
+ GNUNET_JSON_pack_string ("reducer_type",
+ "error"),
GNUNET_JSON_pack_uint64 ("code",
ec),
GNUNET_JSON_pack_string ("hint",