Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/delegation.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | bool ret = reduceLevels(hash, levels, [&](const Level &l) { | ||||
pauth = &l.pubkey; | pauth = &l.pubkey; | ||||
return true; | return true; | ||||
}); | }); | ||||
auth = *pauth; | auth = *pauth; | ||||
return ret; | return ret; | ||||
} | } | ||||
std::optional<CPubKey> Delegation::getMaster() const { | |||||
return levels.size() == 0 | |||||
? std::nullopt | |||||
: std::make_optional<CPubKey>(levels.back().pubkey); | |||||
} | |||||
} // namespace avalanche | } // namespace avalanche |