Skip to content

Commit

Permalink
Merge branch 'testnet' into accelerator
Browse files Browse the repository at this point in the history
  • Loading branch information
SpyCheese committed Jan 16, 2025
2 parents e8edc60 + 710514b commit e3a1fb7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crypto/block/block.tlb
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ transaction$0111 account_addr:bits256 lt:uint64
total_fees:CurrencyCollection state_update:^(HASH_UPDATE Account)
description:^TransactionDescr = Transaction;

!merkle_update#02 {X:Type} old_hash:bits256 new_hash:bits256
!merkle_update#04 {X:Type} old_hash:bits256 new_hash:bits256 old_depth:uint16 new_depth:uint16
old:^X new:^X = MERKLE_UPDATE X;
update_hashes#72 {X:Type} old_hash:bits256 new_hash:bits256
= HASH_UPDATE X;
Expand Down
2 changes: 1 addition & 1 deletion crypto/tl/tlbc-gen-cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,7 @@ void CppTypeCode::generate_skip_field(const Constructor& constr, const Field& fi
output_cpp_expr(ss, expr, 100);
ss << '.';
}
ss << "validate_skip_ref(ops, cs, weak)" << tail;
ss << "validate_skip_ref(ops, cs, " << (constr.is_special ? "true" : "weak") << ")" << tail;
actions += Action{ss.str()};
}

Expand Down
8 changes: 7 additions & 1 deletion crypto/tl/tlblib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,13 @@ bool TLB::validate_ref_internal(int* ops, Ref<vm::Cell> cell_ref, bool weak) con
}
bool is_special;
auto cs = load_cell_slice_special(std::move(cell_ref), is_special);
return always_special() ? is_special : (is_special ? weak : (validate_skip(ops, cs) && cs.empty_ext()));
if (cs.special_type() == vm::Cell::SpecialType::PrunnedBranch && weak) {
return true;
}
if (always_special() != is_special) {
return false;
}
return validate_skip(ops, cs, weak) && cs.empty_ext();
}

bool TLB::print_skip(PrettyPrinter& pp, vm::CellSlice& cs) const {
Expand Down
2 changes: 1 addition & 1 deletion emulator/emulator-extern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ const char *tvm_emulator_emulate_run_method(uint32_t len, const char *params_boc
emulator->set_vm_verbosity_level(0);
emulator->set_gas_limit(gas_limit);
emulator->set_c7_raw(c7->fetch(0).as_tuple());
if (libs.is_empty()) {
if (!libs.is_empty()) {
emulator->set_libraries(std::move(libs));
}
auto result = emulator->run_get_method(int(method_id), stack);
Expand Down
3 changes: 2 additions & 1 deletion tl/tl/tl_jni_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ static size_t get_utf8_from_utf16_length(const jchar *p, jsize len) {
for (jsize i = 0; i < len; i++) {
unsigned int cur = p[i];
if ((cur & 0xF800) == 0xD800) {
++i;
if (i < len) {
unsigned int next = p[++i];
unsigned int next = p[i];
if ((next & 0xFC00) == 0xDC00 && (cur & 0x400) == 0) {
result += 4;
continue;
Expand Down

0 comments on commit e3a1fb7

Please sign in to comment.