@@ -78,7 +78,7 @@ int64_t MaxBeaconAge()
78
78
int64_t BeaconAgeAdvertiseThreshold ()
79
79
{
80
80
// 5 months in seconds.
81
- return 3600 * 24 * 30 * 5 ;
81
+ return 3600 * 24 * 30 * 5 ;
82
82
}
83
83
84
84
void GetBeaconElements (const std::string& sBeacon , std::string& out_cpid, std::string& out_address, std::string& out_publickey)
@@ -101,7 +101,7 @@ std::string GetBeaconPublicKey(const std::string& cpid, bool bAdvertisingBeacon)
101
101
std::string sBeacon = RetrieveBeaconValueWithMaxAge (cpid, iMaxSeconds);
102
102
if (sBeacon .empty ())
103
103
return " " ;
104
-
104
+
105
105
// Beacon data structure: CPID,hashRand,Address,beacon public key: base64 encoded
106
106
std::string sContract = DecodeBase64 (sBeacon );
107
107
std::vector<std::string> vContract = split (sContract .c_str ()," ;" );
@@ -244,14 +244,14 @@ bool VerifyBeaconContractTx(const CTransaction& tx)
244
244
}
245
245
246
246
bool ImportBeaconKeysFromConfig (const std::string& cpid, CWallet* wallet)
247
- {
247
+ {
248
248
if (cpid.empty ())
249
249
return error (" Empty CPID" );
250
250
251
251
std::string strSecret = GetArgument (" privatekey" + cpid + (fTestNet ? " testnet" : " " ), " " );
252
252
if (strSecret.empty ())
253
253
return false ;
254
-
254
+
255
255
auto vecsecret = ParseHex (strSecret);
256
256
257
257
CKey key;
@@ -335,7 +335,7 @@ BeaconStatus GetBeaconStatus(std::string& sCPID)
335
335
beacon_status.iBeaconTimestamp = BeaconTimeStamp (sCPID );
336
336
beacon_status.timestamp = TimestampToHRDate (beacon_status.iBeaconTimestamp );
337
337
beacon_status.hasBeacon = HasActiveBeacon (sCPID );
338
- beacon_status.dPriorSBMagnitude = NN::Tally::GetMagnitude (NN::MiningId::Parse (sCPID ));
338
+ beacon_status.dPriorSBMagnitude = NN::Tally::GetMagnitude (NN::MiningId::Parse (sCPID )). Floating () ;
339
339
beacon_status.is_mine = (sCPID == NN::GetPrimaryCpid ());
340
340
341
341
return beacon_status;
0 commit comments