Line data Source code
1 : /**
2 : * Copyright Soramitsu Co., Ltd. All Rights Reserved.
3 : * SPDX-License-Identifier: Apache-2.0
4 : */
5 :
6 : #include "ordering/impl/on_demand_common.hpp"
7 :
8 : namespace iroha {
9 : namespace ordering {
10 :
11 : const consensus::RejectRoundType kFirstRejectRound = 0;
12 :
13 : consensus::RejectRoundType currentRejectRoundConsumer(
14 : consensus::RejectRoundType round) {
15 8148 : return round + 2;
16 : }
17 :
18 : const consensus::RejectRoundType kNextRejectRoundConsumer =
19 : kFirstRejectRound + 1;
20 :
21 : const consensus::RejectRoundType kNextCommitRoundConsumer =
22 : kFirstRejectRound;
23 :
24 : consensus::Round nextCommitRound(const consensus::Round &round) {
25 1928 : return {round.block_round + 1, kFirstRejectRound};
26 : }
27 :
28 : consensus::Round nextRejectRound(const consensus::Round &round) {
29 4818 : return {round.block_round, round.reject_round + 1};
30 : }
31 :
32 : } // namespace ordering
33 : } // namespace iroha
|