diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-12-05 20:34:10 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-12-05 21:13:29 +0000 |
commit | d1efe3d91c4b1bbb8178a67b445733f5560df1bb (patch) | |
tree | 76356fe3a75f20375e7eccb112c5073698091f8c /src/cryptonote_basic/cryptonote_basic.h | |
parent | db_lmdb: avoid pointless division (diff) | |
download | monero-d1efe3d91c4b1bbb8178a67b445733f5560df1bb.tar.xz |
cryptonote: set tx hash on newly parsed txes when known
Diffstat (limited to 'src/cryptonote_basic/cryptonote_basic.h')
-rw-r--r-- | src/cryptonote_basic/cryptonote_basic.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_basic/cryptonote_basic.h b/src/cryptonote_basic/cryptonote_basic.h index b0eabb0aa..47674c9b3 100644 --- a/src/cryptonote_basic/cryptonote_basic.h +++ b/src/cryptonote_basic/cryptonote_basic.h @@ -203,6 +203,8 @@ namespace cryptonote void set_hash_valid(bool v) const { hash_valid.store(v,std::memory_order_release); } bool is_blob_size_valid() const { return blob_size_valid.load(std::memory_order_acquire); } void set_blob_size_valid(bool v) const { blob_size_valid.store(v,std::memory_order_release); } + void set_hash(const crypto::hash &h) { hash = h; set_hash_valid(true); } + void set_blob_size(size_t sz) { blob_size = sz; set_blob_size_valid(true); } BEGIN_SERIALIZE_OBJECT() if (!typename Archive<W>::is_saving()) |