Hello,
I'm currently reviewing darkcoin code and was wondering the following:
masternode.h: contains:
CPubKey pubkey;
CPubKey pubkey2;
Why are there 2 public keys? When checking CActiveMasternode::RegisterAsMasterNode I can see that two keypairs are being used to create the initial dsee message:
- one keypair originates from init.cpp: if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, key, pubkey))
- the other one is generated in activemasternode.cpp: if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, key, pubkey))
Both originate from strMasterNodePrivKey so they are basically the same.
I ran some debug code to view pubkey and pubkey2 from all masternodes in the list and they are the same, confirming what was stated above.
Can anyone clarify why 2 keypairs are used and what is their use if they are always the same?
Thank you
I'm currently reviewing darkcoin code and was wondering the following:
masternode.h: contains:
CPubKey pubkey;
CPubKey pubkey2;
Why are there 2 public keys? When checking CActiveMasternode::RegisterAsMasterNode I can see that two keypairs are being used to create the initial dsee message:
- one keypair originates from init.cpp: if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, key, pubkey))
- the other one is generated in activemasternode.cpp: if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, key, pubkey))
Both originate from strMasterNodePrivKey so they are basically the same.
I ran some debug code to view pubkey and pubkey2 from all masternodes in the list and they are the same, confirming what was stated above.
Can anyone clarify why 2 keypairs are used and what is their use if they are always the same?
Thank you
Last edited by a moderator: