ton-blockchain / wallet-contract-v5

w5
MIT License
69 stars 16 forks source link

[Code Fix] Unsafe Whle Loop #12

Closed e6654321 closed 1 month ago

e6654321 commented 2 months ago

10 - Unsafe loop condition which could lead to an error upon the Compute Phase

nns2009 commented 2 months ago

But loop already has:

ifnot (cs.slice_refs()) {
  return ();
}
e6654321 commented 1 month ago

But loop already has:


ifnot (cs.slice_refs()) {

  return ();

}

Yes I'm aware. The anti pattern I'm referring to is on doing 'true' inside the while loop. Putting loops without conditions should be avoided.

nns2009 commented 1 month ago

Putting loops without conditions should be avoided

Why? Your suggestion just spends extra gas for the extra check, but doesn't affect logic in any way

tolya-yanot commented 1 month ago

no problems found