| 212 | } |
| 213 | |
| 214 | bool CActiveMasternode::RegisterByPubKey(std::string strService, std::string strKeyMasternode, std::string collateralAddress, std::string& errorMessage) { |
| 215 | CTxIn vin; |
| 216 | CPubKey pubKeyCollateralAddress; |
| 217 | CKey keyCollateralAddress; |
| 218 | CPubKey pubKeyMasternode; |
| 219 | CKey keyMasternode; |
| 220 | |
| 221 | if (!darkSendSigner.SetKey(strKeyMasternode, errorMessage, keyMasternode, pubKeyMasternode)) { |
| 222 | LogPrintf("CActiveMasternode::RegisterByPubKey() - Error upon calling SetKey: %s\n", errorMessage.c_str()); |
| 223 | return false; |
| 224 | } |
| 225 | |
| 226 | if (!GetMasterNodeVinForPubKey(collateralAddress, vin, pubKeyCollateralAddress, keyCollateralAddress)) { |
| 227 | errorMessage = "could not allocate vin for collateralAddress"; |
| 228 | LogPrintf("Register::Register() - Error: %s\n", errorMessage.c_str()); |
| 229 | return false; |
| 230 | } |
| 231 | return Register(vin, CService(strService), keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, errorMessage); |
| 232 | } |
| 233 | |
| 234 | bool CActiveMasternode::Register(std::string strService, std::string strKeyMasternode, std::string txHash, std::string strOutputIndex, std::string& errorMessage) { |
| 235 | CTxIn vin; |
no test coverage detected