CDT
v4.2.0
инструменты разработчика
producer_schedule.hpp
См. документацию.
1
#pragma once
2
#include <vector>
3
#include "../../core/eosio/name.hpp"
4
#include "../../core/eosio/crypto.hpp"
5
6
namespace
eosio
{
7
20
struct
producer_key
{
21
27
name
producer_name
;
28
34
public_key
block_signing_key
;
35
37
38
friend
constexpr
bool
operator <
(
const
producer_key
& a,
const
producer_key
& b ) {
39
return
a.
producer_name
< b.
producer_name
;
40
}
41
43
44
CDT_REFLECT
(
producer_name
,
block_signing_key
);
45
};
46
59
struct
producer_schedule
{
63
uint32_t
version
;
64
68
std::vector<producer_key>
producers
;
69
70
CDT_REFLECT
(
version
,
producers
);
71
};
72
85
struct
key_weight
{
91
public_key
key
;
92
98
uint16_t
weight
;
99
100
CDT_REFLECT
(
key
,
weight
);
101
};
102
110
struct
block_signing_authority_v0
{
116
uint32_t
threshold
;
117
123
std::vector<key_weight>
keys
;
124
125
bool
is_valid
()
const
;
126
127
CDT_REFLECT
(
threshold
,
keys
);
128
};
129
135
using
block_signing_authority
= std::variant<block_signing_authority_v0>;
136
144
struct
producer_authority
{
145
151
name
producer_name
;
152
156
block_signing_authority
authority
;
157
158
friend
constexpr
bool
operator <
(
const
producer_authority
& a,
const
producer_authority
& b ) {
159
return
a.
producer_name
< b.
producer_name
;
160
}
161
162
CDT_REFLECT
(
producer_name
,
authority
);
163
};
164
170
std::vector<name>
get_active_producers
();
171
172
}
libraries
eosiolib
contracts
eosio
producer_schedule.hpp
Создано системой
1.9.3