CCF
Loading...
Searching...
No Matches
include
ccf
node
ledger_sign_mode.h
Go to the documentation of this file.
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
// Licensed under the Apache 2.0 License.
3
#pragma once
4
5
#include "
ccf/ds/json.h
"
6
7
#include <cstdint>
8
9
namespace
ccf
10
{
11
enum class
LedgerSignMode
: uint8_t
12
{
13
// Emit both traditional node signatures and COSE Sign1 signatures.
14
// Accept join requests from nodes in any signing mode.
15
Dual
= 0,
16
17
// Emit only COSE Sign1 signatures, but accept join requests from
18
// nodes still running in Dual mode. Use during rolling upgrades.
19
CoseAllowDualJoin
= 1,
20
21
// Emit only COSE Sign1 signatures and reject join requests from
22
// nodes running in Dual mode. Final state after a completed upgrade.
23
CoseOnly
= 2
24
};
25
26
DECLARE_JSON_ENUM
(
27
LedgerSignMode
,
28
{{
LedgerSignMode::Dual
,
"Dual"
},
29
{
LedgerSignMode::CoseAllowDualJoin
,
"CoseAllowDualJoin"
},
30
{
LedgerSignMode::CoseOnly
,
"CoseOnly"
}});
31
39
LedgerSignMode
get_ledger_sign_mode
();
40
}
json.h
DECLARE_JSON_ENUM
#define DECLARE_JSON_ENUM(TYPE,...)
Definition
json.h:864
ccf
Definition
app_interface.h:13
ccf::get_ledger_sign_mode
LedgerSignMode get_ledger_sign_mode()
Definition
get_ledger_sign_mode_cose.cpp:8
ccf::LedgerSignMode
LedgerSignMode
Definition
ledger_sign_mode.h:12
ccf::LedgerSignMode::CoseOnly
@ CoseOnly
ccf::LedgerSignMode::Dual
@ Dual
ccf::LedgerSignMode::CoseAllowDualJoin
@ CoseAllowDualJoin
Generated by
1.9.8