mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
liteclient signature check support
1. update liteclient/liteserver. Now liteserver sends signatures of blocks and liteclient checks them. I.e. liteclient completely checks received data. 2. validator-engine: more GC options 3. blockchain-explorer: show all block transactions (instead of 256) 4. some bugfixes
This commit is contained in:
parent
d8244eff53
commit
9d6853ef24
58 changed files with 1480 additions and 325 deletions
|
@ -519,11 +519,11 @@ TEST(base64, main) {
|
|||
REGRESSION_VERIFY(os.str());
|
||||
}
|
||||
|
||||
void check_bits256_scan(std::ostream& os, td::Bits256 a, td::Bits256 b) {
|
||||
void check_bits256_scan(std::ostream& stream, td::Bits256 a, td::Bits256 b) {
|
||||
auto c = a ^ b;
|
||||
auto bit = c.count_leading_zeroes();
|
||||
auto bit2 = a.count_matching(b);
|
||||
// os << a.to_hex() << " and " << b.to_hex() << " match in " << bit << " or " << bit2 << " first bits" << std::endl;
|
||||
// stream << a.to_hex() << " and " << b.to_hex() << " match in " << bit << " or " << bit2 << " first bits" << std::endl;
|
||||
// std::cerr << a.to_hex() << " and " << b.to_hex() << " match in " << bit << " or " << bit2 << " first bits (a XOR b = " << c.to_hex() << ")" << std::endl;
|
||||
CHECK((int)bit >= 0 && bit <= 256);
|
||||
for (td::uint32 i = 0; i < bit; i++) {
|
||||
|
@ -533,7 +533,7 @@ void check_bits256_scan(std::ostream& os, td::Bits256 a, td::Bits256 b) {
|
|||
CHECK(bit == bit2);
|
||||
}
|
||||
|
||||
void check_bits_scan(std::ostream& os, td::ConstBitPtr a, bool value) {
|
||||
void check_bits_scan(std::ostream& stream, td::ConstBitPtr a, bool value) {
|
||||
auto bit = (unsigned)a.scan(value, 256);
|
||||
CHECK((int)bit >= 0 && bit <= 256);
|
||||
for (td::uint32 i = 0; i < bit; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue