mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Automatically integrates git build information into executables.
Usage:
func.exe -V
adnl-pong -V
validator-engine -V
and so on.
Result will be shown in the following format:
Func build information: [ Commit: d8b751d7a5
, Date: 2021-02-27 14:34:41 +0200]
This commit is contained in:
parent
41a3418b7b
commit
bab4c1637e
40 changed files with 492 additions and 78 deletions
|
@ -39,7 +39,7 @@ class MerkleTree {
|
|||
MerkleTree(size_t chunks_count, td::Ref<vm::Cell> root_proof);
|
||||
|
||||
struct Chunk {
|
||||
td::size_t index{0};
|
||||
std::size_t index{0};
|
||||
td::Bits256 hash;
|
||||
};
|
||||
|
||||
|
@ -47,7 +47,7 @@ class MerkleTree {
|
|||
|
||||
MerkleTree() = default;
|
||||
void init_begin(size_t chunks_count);
|
||||
void init_add_chunk(td::size_t index, td::Slice hash);
|
||||
void init_add_chunk(std::size_t index, td::Slice hash);
|
||||
void init_finish();
|
||||
|
||||
// merge external proof with an existing proof
|
||||
|
@ -70,20 +70,20 @@ class MerkleTree {
|
|||
|
||||
private:
|
||||
td::uint64 total_blocks_;
|
||||
td::size_t n_; // n = 2^log_n
|
||||
std::size_t n_; // n = 2^log_n
|
||||
td::uint32 log_n_;
|
||||
td::size_t mark_id_{0};
|
||||
std::vector<td::size_t> mark_; // n_ * 2
|
||||
std::size_t mark_id_{0};
|
||||
std::vector<std::size_t> mark_; // n_ * 2
|
||||
std::vector<td::Ref<vm::Cell>> proof_; // n_ * 2
|
||||
|
||||
td::optional<td::Bits256> root_hash_;
|
||||
td::Ref<vm::Cell> root_proof_;
|
||||
|
||||
td::Status validate_proof(td::Ref<vm::Cell> new_root);
|
||||
bool has_chunk(td::size_t index) const;
|
||||
void remove_chunk(td::size_t index);
|
||||
bool has_chunk(std::size_t index) const;
|
||||
void remove_chunk(std::size_t index);
|
||||
|
||||
void add_chunk(td::size_t index, td::Slice hash);
|
||||
void add_chunk(std::size_t index, td::Slice hash);
|
||||
void init_proof();
|
||||
|
||||
td::Ref<vm::Cell> merge(td::Ref<vm::Cell> root, size_t index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue