Skip to content

Commit

Permalink
generated
Browse files Browse the repository at this point in the history
  • Loading branch information
madMAx43v3r committed Nov 29, 2023
1 parent e533408 commit 44d65e5
Show file tree
Hide file tree
Showing 12 changed files with 155 additions and 933 deletions.
5 changes: 0 additions & 5 deletions generated/include/mmx/RouterAsyncClient.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ public:
const std::function<void()>& _callback = std::function<void()>(),
const std::function<void(const vnx::exception&)>& _error_callback = std::function<void(const vnx::exception&)>());

uint64_t get_farmer_credits(
const std::function<void(const std::vector<std::pair<std::string, uint32_t>>&)>& _callback = std::function<void(const std::vector<std::pair<std::string, uint32_t>>&)>(),
const std::function<void(const vnx::exception&)>& _error_callback = std::function<void(const vnx::exception&)>());

uint64_t get_blocks_at(const uint32_t& height = 0,
const std::function<void(const std::vector<std::shared_ptr<const ::mmx::Block>>&)>& _callback = std::function<void(const std::vector<std::shared_ptr<const ::mmx::Block>>&)>(),
const std::function<void(const vnx::exception&)>& _error_callback = std::function<void(const vnx::exception&)>());
Expand Down Expand Up @@ -134,7 +130,6 @@ private:
std::unordered_map<uint64_t, std::pair<std::function<void(const std::vector<std::string>&)>, std::function<void(const vnx::exception&)>>> vnx_queue_get_connected_peers;
std::unordered_map<uint64_t, std::pair<std::function<void(std::shared_ptr<const ::mmx::PeerInfo>)>, std::function<void(const vnx::exception&)>>> vnx_queue_get_peer_info;
std::unordered_map<uint64_t, std::pair<std::function<void()>, std::function<void(const vnx::exception&)>>> vnx_queue_kick_peer;
std::unordered_map<uint64_t, std::pair<std::function<void(const std::vector<std::pair<std::string, uint32_t>>&)>, std::function<void(const vnx::exception&)>>> vnx_queue_get_farmer_credits;
std::unordered_map<uint64_t, std::pair<std::function<void(const std::vector<std::shared_ptr<const ::mmx::Block>>&)>, std::function<void(const vnx::exception&)>>> vnx_queue_get_blocks_at;
std::unordered_map<uint64_t, std::pair<std::function<void(std::shared_ptr<const ::mmx::Block>)>, std::function<void(const vnx::exception&)>>> vnx_queue_fetch_block;
std::unordered_map<uint64_t, std::pair<std::function<void(std::shared_ptr<const ::mmx::Block>)>, std::function<void(const vnx::exception&)>>> vnx_queue_fetch_block_at;
Expand Down
51 changes: 22 additions & 29 deletions generated/include/mmx/RouterBase.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,12 @@ public:
uint32_t max_peer_set = 100;
uint32_t max_sent_cache = 20000;
uint32_t max_hash_cache = 100000;
uint32_t vdf_credits = 1024;
uint32_t block_credits = 256;
uint32_t vdf_credits = 100;
uint32_t block_credits = 50;
uint32_t proof_credits = 10;
uint32_t vdf_relay_cost = 256;
uint32_t proof_relay_cost = 2;
uint32_t dummy_relay_cost = 2;
uint32_t block_relay_cost = 16;
uint32_t max_node_credits = 1024;
uint32_t max_farmer_credits = 64;
uint32_t max_node_credits = 100;
uint32_t vdf_relay_cost = 50;
uint32_t block_relay_cost = 10;
uint32_t node_version = 102;
::mmx::node_type_e mode = ::mmx::node_type_e::FULL_NODE;
vnx::bool_t do_relay = true;
Expand Down Expand Up @@ -117,7 +114,6 @@ protected:
virtual std::vector<std::string> get_connected_peers() const = 0;
virtual std::shared_ptr<const ::mmx::PeerInfo> get_peer_info() const = 0;
virtual void kick_peer(const std::string& address) = 0;
virtual std::vector<std::pair<std::string, uint32_t>> get_farmer_credits() const = 0;
virtual void get_blocks_at_async(const uint32_t& height, const vnx::request_id_t& _request_id) const = 0;
void get_blocks_at_async_return(const vnx::request_id_t& _request_id, const std::vector<std::shared_ptr<const ::mmx::Block>>& _ret_0) const;
virtual void fetch_block_async(const ::mmx::hash_t& hash, const vnx::optional<std::string>& address, const vnx::request_id_t& _request_id) const = 0;
Expand All @@ -140,7 +136,7 @@ protected:

template<typename T>
void RouterBase::accept_generic(T& _visitor) const {
_visitor.template type_begin<RouterBase>(62);
_visitor.template type_begin<RouterBase>(59);
_visitor.type_field("port", 0); _visitor.accept(port);
_visitor.type_field("host", 1); _visitor.accept(host);
_visitor.type_field("max_connections", 2); _visitor.accept(max_connections);
Expand Down Expand Up @@ -185,25 +181,22 @@ void RouterBase::accept_generic(T& _visitor) const {
_visitor.type_field("vdf_credits", 41); _visitor.accept(vdf_credits);
_visitor.type_field("block_credits", 42); _visitor.accept(block_credits);
_visitor.type_field("proof_credits", 43); _visitor.accept(proof_credits);
_visitor.type_field("vdf_relay_cost", 44); _visitor.accept(vdf_relay_cost);
_visitor.type_field("proof_relay_cost", 45); _visitor.accept(proof_relay_cost);
_visitor.type_field("dummy_relay_cost", 46); _visitor.accept(dummy_relay_cost);
_visitor.type_field("block_relay_cost", 47); _visitor.accept(block_relay_cost);
_visitor.type_field("max_node_credits", 48); _visitor.accept(max_node_credits);
_visitor.type_field("max_farmer_credits", 49); _visitor.accept(max_farmer_credits);
_visitor.type_field("node_version", 50); _visitor.accept(node_version);
_visitor.type_field("mode", 51); _visitor.accept(mode);
_visitor.type_field("do_relay", 52); _visitor.accept(do_relay);
_visitor.type_field("open_port", 53); _visitor.accept(open_port);
_visitor.type_field("max_tx_upload", 54); _visitor.accept(max_tx_upload);
_visitor.type_field("max_pending_cost", 55); _visitor.accept(max_pending_cost);
_visitor.type_field("priority_queue_size", 56); _visitor.accept(priority_queue_size);
_visitor.type_field("seed_peers", 57); _visitor.accept(seed_peers);
_visitor.type_field("fixed_peers", 58); _visitor.accept(fixed_peers);
_visitor.type_field("block_peers", 59); _visitor.accept(block_peers);
_visitor.type_field("storage_path", 60); _visitor.accept(storage_path);
_visitor.type_field("node_server", 61); _visitor.accept(node_server);
_visitor.template type_end<RouterBase>(62);
_visitor.type_field("max_node_credits", 44); _visitor.accept(max_node_credits);
_visitor.type_field("vdf_relay_cost", 45); _visitor.accept(vdf_relay_cost);
_visitor.type_field("block_relay_cost", 46); _visitor.accept(block_relay_cost);
_visitor.type_field("node_version", 47); _visitor.accept(node_version);
_visitor.type_field("mode", 48); _visitor.accept(mode);
_visitor.type_field("do_relay", 49); _visitor.accept(do_relay);
_visitor.type_field("open_port", 50); _visitor.accept(open_port);
_visitor.type_field("max_tx_upload", 51); _visitor.accept(max_tx_upload);
_visitor.type_field("max_pending_cost", 52); _visitor.accept(max_pending_cost);
_visitor.type_field("priority_queue_size", 53); _visitor.accept(priority_queue_size);
_visitor.type_field("seed_peers", 54); _visitor.accept(seed_peers);
_visitor.type_field("fixed_peers", 55); _visitor.accept(fixed_peers);
_visitor.type_field("block_peers", 56); _visitor.accept(block_peers);
_visitor.type_field("storage_path", 57); _visitor.accept(storage_path);
_visitor.type_field("node_server", 58); _visitor.accept(node_server);
_visitor.template type_end<RouterBase>(59);
}


Expand Down
2 changes: 0 additions & 2 deletions generated/include/mmx/RouterClient.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public:

void kick_peer_async(const std::string& address = "");

std::vector<std::pair<std::string, uint32_t>> get_farmer_credits();

std::vector<std::shared_ptr<const ::mmx::Block>> get_blocks_at(const uint32_t& height = 0);

std::shared_ptr<const ::mmx::Block> fetch_block(const ::mmx::hash_t& hash = ::mmx::hash_t(), const vnx::optional<std::string>& address = nullptr);
Expand Down
71 changes: 0 additions & 71 deletions generated/include/mmx/Router_get_farmer_credits.hxx

This file was deleted.

73 changes: 0 additions & 73 deletions generated/include/mmx/Router_get_farmer_credits_return.hxx

This file was deleted.

60 changes: 0 additions & 60 deletions generated/include/mmx/package.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ class Router_get_blocks_at;
class Router_get_blocks_at_return;
class Router_get_connected_peers;
class Router_get_connected_peers_return;
class Router_get_farmer_credits;
class Router_get_farmer_credits_return;
class Router_get_id;
class Router_get_id_return;
class Router_get_info;
Expand Down Expand Up @@ -817,8 +815,6 @@ MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_blo
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_blocks_at_return; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_connected_peers; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_connected_peers_return; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_farmer_credits; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_farmer_credits_return; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_id; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_id_return; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_info; ///< \private
Expand Down Expand Up @@ -1324,8 +1320,6 @@ void read(TypeInput& in, ::mmx::Router_get_blocks_at& value, const TypeCode* typ
void read(TypeInput& in, ::mmx::Router_get_blocks_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::Router_get_connected_peers& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::Router_get_connected_peers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::Router_get_farmer_credits& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::Router_get_farmer_credits_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::Router_get_id& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::Router_get_id_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::Router_get_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private
Expand Down Expand Up @@ -1835,8 +1829,6 @@ void write(TypeOutput& out, const ::mmx::Router_get_blocks_at& value, const Type
void write(TypeOutput& out, const ::mmx::Router_get_blocks_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::Router_get_connected_peers& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::Router_get_connected_peers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::Router_get_farmer_credits& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::Router_get_farmer_credits_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::Router_get_id& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::Router_get_id_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::Router_get_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private
Expand Down Expand Up @@ -2346,8 +2338,6 @@ void read(std::istream& in, ::mmx::Router_get_blocks_at& value); ///< \private
void read(std::istream& in, ::mmx::Router_get_blocks_at_return& value); ///< \private
void read(std::istream& in, ::mmx::Router_get_connected_peers& value); ///< \private
void read(std::istream& in, ::mmx::Router_get_connected_peers_return& value); ///< \private
void read(std::istream& in, ::mmx::Router_get_farmer_credits& value); ///< \private
void read(std::istream& in, ::mmx::Router_get_farmer_credits_return& value); ///< \private
void read(std::istream& in, ::mmx::Router_get_id& value); ///< \private
void read(std::istream& in, ::mmx::Router_get_id_return& value); ///< \private
void read(std::istream& in, ::mmx::Router_get_info& value); ///< \private
Expand Down Expand Up @@ -2857,8 +2847,6 @@ void write(std::ostream& out, const ::mmx::Router_get_blocks_at& value); ///< \p
void write(std::ostream& out, const ::mmx::Router_get_blocks_at_return& value); ///< \private
void write(std::ostream& out, const ::mmx::Router_get_connected_peers& value); ///< \private
void write(std::ostream& out, const ::mmx::Router_get_connected_peers_return& value); ///< \private
void write(std::ostream& out, const ::mmx::Router_get_farmer_credits& value); ///< \private
void write(std::ostream& out, const ::mmx::Router_get_farmer_credits_return& value); ///< \private
void write(std::ostream& out, const ::mmx::Router_get_id& value); ///< \private
void write(std::ostream& out, const ::mmx::Router_get_id_return& value); ///< \private
void write(std::ostream& out, const ::mmx::Router_get_info& value); ///< \private
Expand Down Expand Up @@ -3368,8 +3356,6 @@ void accept(Visitor& visitor, const ::mmx::Router_get_blocks_at& value); ///< \p
void accept(Visitor& visitor, const ::mmx::Router_get_blocks_at_return& value); ///< \private
void accept(Visitor& visitor, const ::mmx::Router_get_connected_peers& value); ///< \private
void accept(Visitor& visitor, const ::mmx::Router_get_connected_peers_return& value); ///< \private
void accept(Visitor& visitor, const ::mmx::Router_get_farmer_credits& value); ///< \private
void accept(Visitor& visitor, const ::mmx::Router_get_farmer_credits_return& value); ///< \private
void accept(Visitor& visitor, const ::mmx::Router_get_id& value); ///< \private
void accept(Visitor& visitor, const ::mmx::Router_get_id_return& value); ///< \private
void accept(Visitor& visitor, const ::mmx::Router_get_info& value); ///< \private
Expand Down Expand Up @@ -10115,52 +10101,6 @@ struct type<::mmx::Router_get_connected_peers_return> {
void create_dynamic_code(std::vector<uint16_t>& code, const ::mmx::Router_get_connected_peers_return& value, bool special = false);
};

/// \private
template<>
struct type<::mmx::Router_get_farmer_credits> {
void read(TypeInput& in, ::mmx::Router_get_farmer_credits& value, const TypeCode* type_code, const uint16_t* code) {
vnx::read(in, value, type_code, code);
}
void write(TypeOutput& out, const ::mmx::Router_get_farmer_credits& value, const TypeCode* type_code, const uint16_t* code) {
vnx::write(out, value, type_code, code);
}
void read(std::istream& in, ::mmx::Router_get_farmer_credits& value) {
vnx::read(in, value);
}
void write(std::ostream& out, const ::mmx::Router_get_farmer_credits& value) {
vnx::write(out, value);
}
void accept(Visitor& visitor, const ::mmx::Router_get_farmer_credits& value) {
vnx::accept(visitor, value);
}
const TypeCode* get_type_code();
void create_dynamic_code(std::vector<uint16_t>& code);
void create_dynamic_code(std::vector<uint16_t>& code, const ::mmx::Router_get_farmer_credits& value, bool special = false);
};

/// \private
template<>
struct type<::mmx::Router_get_farmer_credits_return> {
void read(TypeInput& in, ::mmx::Router_get_farmer_credits_return& value, const TypeCode* type_code, const uint16_t* code) {
vnx::read(in, value, type_code, code);
}
void write(TypeOutput& out, const ::mmx::Router_get_farmer_credits_return& value, const TypeCode* type_code, const uint16_t* code) {
vnx::write(out, value, type_code, code);
}
void read(std::istream& in, ::mmx::Router_get_farmer_credits_return& value) {
vnx::read(in, value);
}
void write(std::ostream& out, const ::mmx::Router_get_farmer_credits_return& value) {
vnx::write(out, value);
}
void accept(Visitor& visitor, const ::mmx::Router_get_farmer_credits_return& value) {
vnx::accept(visitor, value);
}
const TypeCode* get_type_code();
void create_dynamic_code(std::vector<uint16_t>& code);
void create_dynamic_code(std::vector<uint16_t>& code, const ::mmx::Router_get_farmer_credits_return& value, bool special = false);
};

/// \private
template<>
struct type<::mmx::Router_get_id> {
Expand Down
Loading

0 comments on commit 44d65e5

Please sign in to comment.