#include <producer_schedule.hpp>
Definition at line 231 of file producer_schedule.hpp.
◆ producer_authority_schedule() [1/3]
sysio::chain::producer_authority_schedule::producer_authority_schedule |
( |
| ) |
|
|
default |
◆ producer_authority_schedule() [2/3]
Up-convert a legacy producer schedule
Definition at line 237 of file producer_schedule.hpp.
239 {
240 producers.reserve( old.producers.size() );
241 for(
const auto&
p : old.producers )
242 producers.emplace_back(producer_authority{
p.producer_name, block_signing_authority_v0{ 1, {{
p.block_signing_key, 1}} } });
243 }
uint32_t version
sequentially incrementing version number
vector< producer_authority > producers
◆ producer_authority_schedule() [3/3]
sysio::chain::producer_authority_schedule::producer_authority_schedule |
( |
uint32_t | version, |
|
|
std::initializer_list< producer_authority > | producers ) |
|
inline |
◆ from_shared()
Definition at line 261 of file producer_schedule.hpp.
261 {
263 result.version = src.version;
264 result.producers.reserve(src.producers.size());
265 for(
const auto&
p : src.producers ) {
267 }
268
269 return result;
270 }
producer_authority_schedule()=default
static auto from_shared(const shared_producer_authority &src)
◆ to_shared()
auto sysio::chain::producer_authority_schedule::to_shared |
( |
chainbase::allocator< char > | alloc | ) |
const |
|
inline |
Definition at line 250 of file producer_schedule.hpp.
250 {
251 auto result = shared_producer_authority_schedule(alloc);
253 result.producers.clear();
254 result.producers.reserve(
producers.size() );
256 result.producers.emplace_back(
p.to_shared(alloc));
257 }
258 return result;
259 }
◆ operator!=
Definition at line 284 of file producer_schedule.hpp.
285 {
287 }
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
◆ operator==
Definition at line 275 of file producer_schedule.hpp.
276 {
277 if(
a.version != b.version )
return false;
278 if (
a.producers.size() != b.producers.size() )
return false;
279 for(
uint32_t i = 0; i <
a.producers.size(); ++i )
280 if( ! (
a.producers[i] == b.producers[i]) )
return false;
281 return true;
282 }
◆ producers
◆ version
uint32_t sysio::chain::producer_authority_schedule::version = 0 |
The documentation for this struct was generated from the following file: