forknote / cryptonote-generator

Generate Cryptonote coin with 1 command
104 stars 211 forks source link

Modify logic for V7 variant #83

Closed 2acoin closed 6 years ago

2acoin commented 6 years ago

Modified the code in the extensions\cryptonight-v7.json file to correct the logic for activation of V7.

kennetanti commented 6 years ago

This pull request look gross. I dont think u should check for last_block == 0 ... You should just set it to UINT32_MAX if you want it to be "v7 forever"

pmitchev commented 6 years ago

I use this logic in other files. The default is 0 and it actually makes sense. It can never be 0. Thank you @2acoin

kennetanti commented 6 years ago

But block index and last block default to 0. I would argue if its 0 that means its unconfigured and they dont want cryptonight v7. Mainly because then the multiply code could be identical (almost) where if block index and last block are not specified in the config, then the blockchain would not use v7

kennetanti commented 6 years ago

Otherwise you would need 2 different builds for v0 vs v7 because there is no other value you can use to disable v7 ? Idk your the master of the repo i guess. (If i really cared that much i would make forkforknote)

pmitchev commented 6 years ago

You are right, it should be more clear *_BLOCK_INDEX=0 means "not activated"

kennetanti commented 6 years ago

That way you wouldnt have to change your config files to work with forknote-pool or forknoted if they are designed for cryptonote-generator and vice-versa. Getting some liquor then ill do the thing

kennetanti commented 6 years ago

84 looks like this will work with /multiply/ jsons if you leave them both on default of 0. Or two identical numbers. Because y <= x && x < y is always false. If you want to make it always enabled you can set index to 0 and last to UINT32_MAX or (uint32_t)-1 or 0xFFFFFFFF (all of those are the same number)