-
Notifications
You must be signed in to change notification settings - Fork 1
/
operation-cancel-change-role-request.x
64 lines (53 loc) · 1.59 KB
/
operation-cancel-change-role-request.x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
%#include "xdr/ledger-entries.h"
namespace stellar
{
/* CancelChangeRoleRequestOp
Cancels change role reviable request
Result: CancelChangeRoleRequestResult
*/
//: CancelChangeRoleRequestOp is used to cancel reviwable request for changing role.
//: If successful, request with the corresponding ID will be deleted
struct CancelChangeRoleRequestOp
{
//: ID of the ChangeRoleRequest request to be canceled
uint64 requestID;
//: Reserved for future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
}
ext;
};
/******* CancelChangeRoleRequestResultCode Result ********/
//: Result codes for CancelChangeRoleRequest operation
enum CancelChangeRoleRequestResultCode
{
// codes considered as "success" for the operation
//: Operation is successfully applied
SUCCESS = 0,
// codes considered as "failure" for the operation
//: ID of a request cannot be 0
REQUEST_ID_INVALID = -1, // request id can not be equal zero
//: ChangeRole request with provided ID is not found
REQUEST_NOT_FOUND = -2 // trying to cancel not existing reviewable request
};
//: Result of successful `CancelChangeRoleRequestOp` application
struct CancelChangeRoleSuccess {
//: Reserved for future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
}
ext;
};
//: Result of CancelChangeRoleRequest operation application along with the result code
union CancelChangeRoleRequestResult switch (CancelChangeRoleRequestResultCode code)
{
case SUCCESS:
CancelChangeRoleSuccess success;
default:
void;
};
}