Revert "Remove unused WriteSetWithClaims (#3485)" (#3487)

This reverts commit 7c34df0668.
This commit is contained in:
Amaury Chamayou 2022-02-01 13:17:14 +00:00 коммит произвёл GitHub
Родитель 7c34df0668
Коммит 171dc2a6e9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -53,11 +53,15 @@ class NodeStatus(Enum):
class EntryType(Enum):
WRITE_SET = 0
SNAPSHOT = 1
WRITE_SET_WITH_COMMIT_EVIDENCE = 2
WRITE_SET_WITH_COMMIT_EVIDENCE_AND_CLAIMS = 3
WRITE_SET_WITH_CLAIMS = 2
WRITE_SET_WITH_COMMIT_EVIDENCE = 3
WRITE_SET_WITH_COMMIT_EVIDENCE_AND_CLAIMS = 4
def has_claims(self):
return self == EntryType.WRITE_SET_WITH_COMMIT_EVIDENCE_AND_CLAIMS
return self in (
EntryType.WRITE_SET_WITH_CLAIMS,
EntryType.WRITE_SET_WITH_COMMIT_EVIDENCE_AND_CLAIMS,
)
def has_commit_evidence(self):
return self in (

Просмотреть файл

@ -287,14 +287,16 @@ namespace kv
{
WriteSet = 0,
Snapshot = 1,
WriteSetWithCommitEvidence = 2,
WriteSetWithCommitEvidenceAndClaims = 3,
WriteSetWithClaims = 2,
WriteSetWithCommitEvidence = 3,
WriteSetWithCommitEvidenceAndClaims = 4,
MAX = WriteSetWithCommitEvidenceAndClaims
};
static bool has_claims(const EntryType& et)
{
return et == EntryType::WriteSetWithCommitEvidenceAndClaims;
return et == EntryType::WriteSetWithClaims ||
et == EntryType::WriteSetWithCommitEvidenceAndClaims;
}
static bool has_commit_evidence(const EntryType& et)