mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
celldb in-memory mode, stats for actors, perf counters, minor fix in rldp2 (#1164)
* getactorstats query for validator-engine-console * celldb in-memory mode (--celldb-in-memory option) * rldp2: bugfix - do not estimate speed while nothing is sent * add simple ed25519 benchmark * fix compilation errors of different platforms and move to c++20 * fix some warnings * turn on TON_USE_ABSEIL for glibc 2.27 nix build --------- Co-authored-by: birydrad <>
This commit is contained in:
parent
5f51d3d04f
commit
72020c04c4
100 changed files with 3407 additions and 359 deletions
|
@ -113,7 +113,8 @@ class TonDbTransactionImpl;
|
|||
using TonDbTransaction = std::unique_ptr<TonDbTransactionImpl>;
|
||||
class TonDbTransactionImpl {
|
||||
public:
|
||||
SmartContractDb begin_smartcontract(td::Slice hash = {});
|
||||
|
||||
SmartContractDb begin_smartcontract(td::Slice hash = std::string(32, '\0'));
|
||||
|
||||
void commit_smartcontract(SmartContractDb txn);
|
||||
void commit_smartcontract(SmartContractDiff txn);
|
||||
|
@ -142,6 +143,20 @@ class TonDbTransactionImpl {
|
|||
friend bool operator<(td::Slice hash, const SmartContractInfo &info) {
|
||||
return hash < info.hash;
|
||||
}
|
||||
|
||||
struct Eq {
|
||||
using is_transparent = void; // Pred to use
|
||||
bool operator()(const SmartContractInfo &info, const SmartContractInfo &other_info) const { return info.hash == other_info.hash;}
|
||||
bool operator()(const SmartContractInfo &info, td::Slice hash) const { return info.hash == hash;}
|
||||
bool operator()(td::Slice hash, const SmartContractInfo &info) const { return info.hash == hash;}
|
||||
|
||||
};
|
||||
struct Hash {
|
||||
using is_transparent = void; // Pred to use
|
||||
using transparent_key_equal = Eq;
|
||||
size_t operator()(td::Slice hash) const { return cell_hash_slice_hash(hash); }
|
||||
size_t operator()(const SmartContractInfo &info) const { return cell_hash_slice_hash(info.hash);}
|
||||
};
|
||||
};
|
||||
|
||||
CellHashTable<SmartContractInfo> contracts_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue