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
|
@ -42,12 +42,18 @@ class uint128_emulated {
|
|||
uint64 lo() const {
|
||||
return lo_;
|
||||
}
|
||||
uint64 rounded_hi() const {
|
||||
return hi_ + (lo_ >> 63);
|
||||
}
|
||||
static uint128 from_signed(int64 x) {
|
||||
if (x >= 0) {
|
||||
return uint128(0, x);
|
||||
}
|
||||
return uint128(std::numeric_limits<uint64>::max(), static_cast<uint64>(x));
|
||||
}
|
||||
static uint128 from_unsigned(uint64 x) {
|
||||
return uint128(0, x);
|
||||
}
|
||||
|
||||
uint128 add(uint128 other) const {
|
||||
uint128 res(other.hi() + hi(), other.lo() + lo());
|
||||
|
@ -212,13 +218,18 @@ class uint128_intrinsic {
|
|||
static uint128 from_signed(int64 x) {
|
||||
return uint128(static_cast<ValueT>(x));
|
||||
}
|
||||
static uint128 from_unsigned(uint64 x) {
|
||||
return uint128(static_cast<ValueT>(x));
|
||||
}
|
||||
uint64 hi() const {
|
||||
return uint64(value() >> 64);
|
||||
}
|
||||
uint64 lo() const {
|
||||
return uint64(value() & std::numeric_limits<uint64>::max());
|
||||
}
|
||||
|
||||
uint64 rounded_hi() const {
|
||||
return uint64((value() + (1ULL << 63)) >> 64);
|
||||
}
|
||||
uint128 add(uint128 other) const {
|
||||
return uint128(value() + other.value());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue