minime icon indicating copy to clipboard operation
minime copied to clipboard

.length yields the fixed length of the byte array (read-only). so I think checkpoints.length++ is pointless, Can you explain its intention?I'm confused,thank you!

Open 17Damon opened this issue 7 years ago • 1 comments

https://github.com/Giveth/minime/blob/c23d03cb02b0fb89662fe1617e5e7136cbf270a4/contracts/MiniMeToken.sol#L454

17Damon avatar Dec 03 '17 14:12 17Damon

The length of an array isn't read only, you can update it like you can any other value. That line is essentially doing a .push(), but I believe it's cheaper than doing so.

nateawelch avatar Jun 14 '18 02:06 nateawelch