Scorum
sign_state.hpp
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace scorum {
7 namespace protocol {
8 
9 typedef std::function<authority(const std::string&)> authority_getter;
10 
11 struct sign_state
12 {
16  bool signed_by(const public_key_type& k);
17  bool check_authority(const std::string& id);
18 
23  bool check_authority(const authority& au, uint32_t depth = 0);
24 
26 
27  sign_state(const flat_set<public_key_type>& sigs, const authority_getter& a, const flat_set<public_key_type>& keys);
28 
30  const flat_set<public_key_type>& available_keys;
31 
32  flat_map<public_key_type, bool> provided_signatures;
33  flat_set<std::string> approved_by;
34  uint32_t max_recursion = SCORUM_MAX_SIG_CHECK_DEPTH;
35 };
36 }
37 } // scorum::protocol
std::function< authority(const std::string &)> authority_getter
Definition: sign_state.hpp:9
Definition: asset.cpp:15
bool check_authority(const std::string &id)
Definition: sign_state.cpp:20
flat_set< std::string > approved_by
Definition: sign_state.hpp:33
const authority_getter & get_active
Definition: sign_state.hpp:29
sign_state(const flat_set< public_key_type > &sigs, const authority_getter &a, const flat_set< public_key_type > &keys)
Definition: sign_state.cpp:77
const flat_set< public_key_type > & available_keys
Definition: sign_state.hpp:30
flat_map< public_key_type, bool > provided_signatures
Definition: sign_state.hpp:32
bool signed_by(const public_key_type &k)
Definition: sign_state.cpp:7