frangio / cacheable-beacon-proxy

Upgradeable proxy with the least possible gas overhead.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redundant size check

hrkrshnn opened this issue · comments

commented

if (cache.code.length > 0) {
CacheableBeaconImpl(cache).selfDestructIfCache();
}

The check if (cache.code.length > 0) is redundant as it is done by the compiler in CacheableBeaconImpl(cache).selfDestructIfCache();

@hrkrshnn When I compile and run the test with version 0.8.13, it won't pass unless this size check is in there.

@zach3040 Yes, on second inspection PR #2 should not have been merged. The explicit check for code size was there to prevent a revert, which is necessary for functioning.

Thanks for raising this. My bad for not setting up the CI to run the tests. Reverted in c4710b4.

commented

Sorry about that 😬