Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant check for c5 slice being empty #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions contracts/wallet_v5.fc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ cell verify_c5_actions(cell c5, int is_external) inline {
count += 1;
}
throw_unless(error::invalid_c5, count <= 255);
throw_unless(error::invalid_c5, cs.slice_refs() == 0);

return c5;
}
Expand Down Expand Up @@ -202,7 +201,7 @@ cell verify_c5_actions(cell c5, int is_external) inline {
.end_cell());

if (is_external) {
;; For external messages we commit seqno changes, so that even if an exception occurs further on, the reply-protection will still work.
;; For external messages we commit seqno changes, so that even if an exception occurs further on, the replay-protection will still work.
commit();
}

Expand Down Expand Up @@ -298,4 +297,4 @@ cell get_extensions() method_id {
return get_data().begin_parse()
.skip_bits(size::bool + size::seqno + size::wallet_id + size::public_key)
.preload_dict();
}
}
2 changes: 1 addition & 1 deletion types.tlb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal_signed#73696e74 signed:SignedRequest = InternalMsgBody;
internal_extension#6578746e query_id:(## 64) inner:InnerRequest = InternalMsgBody;
external_signed#7369676e signed:SignedRequest = ExternalMsgBody;

actions$_ out_actions:(Maybe OutList) has_other_actions:(## 1) {m:#} {n:#} other_actions:(ActionList n m) = InnerRequest;
actions$_ out_actions:(Maybe ^OutList) has_other_actions:(## 1) {m:#} {n:#} other_actions:(ActionList n m) = InnerRequest;

// Contract state
contract_state$_ is_signature_allowed:(## 1) seqno:# wallet_id:(## 32) public_key:(## 256) extensions_dict:(HashmapE 256 int1) = ContractState;