mirror of
https://github.com/monero-project/monero.git
synced 2025-11-26 14:47:34 -05:00
Merge pull request #4946
6644b9bblockchain_db: remove a couple unused functions (moneromooo-monero)ce594f5blockchain_db: allocate known size vector only once (moneromooo-monero)8332698db_lmdb: inline check_open, it's trivial and called everywhere (moneromooo-monero)5511563db_lmdb: avoid pointless division (moneromooo-monero)d1efe3dcryptonote: set tx hash on newly parsed txes when known (moneromooo-monero)9cc68a2tx_pool: add a few std::move where it can make a difference (moneromooo-monero)
This commit is contained in:
commit
69e8567c0e
8 changed files with 31 additions and 104 deletions
|
|
@ -211,6 +211,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())
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ namespace cryptonote
|
|||
CHECK_AND_ASSERT_MES(r, false, "Failed to parse transaction from blob");
|
||||
CHECK_AND_ASSERT_MES(expand_transaction_1(tx, false), false, "Failed to expand transaction data");
|
||||
tx.invalidate_hashes();
|
||||
tx.set_blob_size(tx_blob.size());
|
||||
return true;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue