eosio.cdt icon indicating copy to clipboard operation
eosio.cdt copied to clipboard

block_timestamp::maximum returns a small value

Open tbfleming opened this issue 2 years ago • 0 comments

block_timestamp::maximum has this incorrect definition:

static block_timestamp maximum() { return block_timestamp( 0xffff ); }

I recommend the following:

  • Remove this function
  • Create a replacement with a different name (e.g. max()) to prevent existing contracts that rely on maximum from changing behavior. Contracts which rely on the incorrect behavior will fail to build, notifying the authors of the potentially serious problem.

tbfleming avatar Sep 03 '21 17:09 tbfleming