From 08444624988b9bbf62fb0349b45af2bb58271c4f Mon Sep 17 00:00:00 2001 From: anighanta Date: Mon, 4 Oct 2021 11:26:56 -0500 Subject: [PATCH] added a flag that allows a creator of the schedule Trasaction to sign it if an Identical schedule aready exists Signed-off-by: anighanta --- services/response_code.proto | 6 ++++++ services/schedule_create.proto | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/services/response_code.proto b/services/response_code.proto index 96bf0e42..4703f4c1 100644 --- a/services/response_code.proto +++ b/services/response_code.proto @@ -738,6 +738,7 @@ enum ResponseCodeEnum { /** * A schedule already exists with the same identifying fields of an attempted ScheduleCreate (that is, all fields other than scheduledPayerAccountID) + * and the merge_with_identical_schedule field of the schedule is set to false. */ IDENTICAL_SCHEDULE_ALREADY_CREATED = 210; @@ -1025,4 +1026,9 @@ enum ResponseCodeEnum { * The provided pause key was invalid */ INVALID_PAUSE_KEY = 267; + + /** + * A schedule already exists with the same identifying fields of an attempted ScheduleCreate except for its payerAccountID + */ + IDENTICAL_SCHEDULE_ALREADY_EXISTS_WITH_DIFFERENT_PAYER = 268; } diff --git a/services/schedule_create.proto b/services/schedule_create.proto index 7eb85892..de014b0c 100644 --- a/services/schedule_create.proto +++ b/services/schedule_create.proto @@ -90,4 +90,13 @@ message ScheduleCreateTransactionBody { * given */ AccountID payerAccountID = 4; + + /** + * Controls how the network will behave when there is an identical transaction already scheduled (but not yet executed). + * + * If true, this ScheduleCreate will resolve to SUCCESS, and the existing schedule entity will receives any signatures from this transaction. + * + * If false, this ScheduleCreate will resolve to IDENTICAL_SCHEDULE_ALREADY_CREATED, and the receipt will contain the id of the existing schedule entity. + */ + bool merge_with_identical_schedule = 5; }