MCPcopy Create free account
hub / github.com/LUX-Core/lux / RegisterByPubKey

Method RegisterByPubKey

src/activemasternode.cpp:214–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214bool 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
234bool CActiveMasternode::Register(std::string strService, std::string strKeyMasternode, std::string txHash, std::string strOutputIndex, std::string& errorMessage) {
235 CTxIn vin;

Callers 1

Calls 2

CServiceClass · 0.70
SetKeyMethod · 0.45

Tested by

no test coverage detected