mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
updated block header
1. Updated block header, proofs now contain more data Notice, that old proofs may become invalid in the future 2. Fixed message routing 3. Fixed block creator id in block header 4. Support for full proofs in tonlib 5. Support for partial state download 6. Some other bugfixes
This commit is contained in:
parent
bce33f588a
commit
13140ddf29
73 changed files with 2084 additions and 304 deletions
|
@ -441,7 +441,7 @@ class Config {
|
|||
};
|
||||
|
||||
public:
|
||||
enum { needValidatorSet = 16, needSpecialSmc = 32, needWorkchainInfo = 256 };
|
||||
enum { needValidatorSet = 16, needSpecialSmc = 32, needWorkchainInfo = 256, needCapabilities = 512 };
|
||||
int mode{0};
|
||||
ton::BlockIdExt block_id;
|
||||
|
||||
|
@ -452,6 +452,8 @@ class Config {
|
|||
std::unique_ptr<ValidatorSet> cur_validators_;
|
||||
std::unique_ptr<vm::Dictionary> workchains_dict_;
|
||||
WorkchainSet workchains_;
|
||||
int version_{-1};
|
||||
long long capabilities_{-1};
|
||||
|
||||
protected:
|
||||
std::unique_ptr<vm::Dictionary> special_smc_dict;
|
||||
|
@ -474,6 +476,24 @@ class Config {
|
|||
bool is_masterchain() const {
|
||||
return block_id.is_masterchain();
|
||||
}
|
||||
bool has_capabilities() const {
|
||||
return capabilities_ >= 0;
|
||||
}
|
||||
long long get_capabilities() const {
|
||||
return capabilities_;
|
||||
}
|
||||
int get_global_version() const {
|
||||
return version_;
|
||||
}
|
||||
bool has_capability(long long cap_set) const {
|
||||
return has_capabilities() && (capabilities_ & cap_set) == cap_set;
|
||||
}
|
||||
bool ihr_enabled() const {
|
||||
return has_capability(ton::capIhrEnabled);
|
||||
}
|
||||
bool create_stats_enabled() const {
|
||||
return has_capability(ton::capCreateStatsEnabled);
|
||||
}
|
||||
bool set_block_id_ext(const ton::BlockIdExt& block_id_ext);
|
||||
td::Result<std::vector<ton::StdSmcAddress>> get_special_smartcontracts(bool without_config = false) const;
|
||||
bool is_special_smartcontract(const ton::StdSmcAddress& addr) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue