forked from such-gitea/wownero-lws
New accounts are 'pushed' to worker threads (#102)
This commit is contained in:
committed by
Lee *!* Clagett
parent
f300bff69f
commit
80604e8133
@@ -36,6 +36,8 @@
|
||||
#include "fwd.h"
|
||||
#include "db/data.h"
|
||||
#include "db/fwd.h"
|
||||
#include "wire/fwd.h"
|
||||
#include "wire/msgpack/fwd.h"
|
||||
|
||||
namespace lws
|
||||
{
|
||||
@@ -54,8 +56,14 @@ namespace lws
|
||||
explicit account(std::shared_ptr<const internal> immutable, db::block_id height, std::vector<std::pair<db::output_id, db::address_index>> spendable, std::vector<crypto::public_key> pubs) noexcept;
|
||||
void null_check() const;
|
||||
|
||||
template<typename F, typename T, typename U>
|
||||
static void map(F& format, T& self, U& immutable);
|
||||
|
||||
public:
|
||||
|
||||
//! Construct an "invalid" account (for de-serialization)
|
||||
account() noexcept;
|
||||
|
||||
//! Construct an account from `source` and current `spendable` outputs.
|
||||
explicit account(db::account const& source, std::vector<std::pair<db::output_id, db::address_index>> spendable, std::vector<crypto::public_key> pubs);
|
||||
|
||||
@@ -71,6 +79,12 @@ namespace lws
|
||||
account& operator=(const account&) = delete;
|
||||
account& operator=(account&&) = default;
|
||||
|
||||
//! Read into `this` from `source`.
|
||||
void read_bytes(::wire::msgpack_reader& source);
|
||||
|
||||
//! Write to `dest` from `this`.
|
||||
void write_bytes(::wire::msgpack_writer& dest) const;
|
||||
|
||||
//! \return A copy of `this`.
|
||||
account clone() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user