@@ -36,7 +36,6 @@ extern std::string GetBeaconPrivateKey(std::string cpid);
36
36
extern std::string SuccessFail (bool f);
37
37
extern Array GetUpgradedBeaconReport ();
38
38
extern Array MagnitudeReport (std::string cpid);
39
- extern bool UserAcknowledgedHoldHarmlessClause (std::string sAddress );
40
39
std::string ConvertBinToHex (std::string a);
41
40
std::string ConvertHexToBin (std::string a);
42
41
bool TallyResearchAverages (bool Forcefully);
@@ -83,8 +82,6 @@ void WriteCache(std::string section, std::string key, std::string value, int64_t
83
82
extern std::string MyBeaconExists (std::string cpid);
84
83
int64_t GetEarliestWalletTransaction ();
85
84
extern bool CheckMessageSignature (std::string sAction ,std::string messagetype, std::string sMsg , std::string sSig , std::string opt_pubkey);
86
- extern std::string CryptoLottery (int64_t locktime);
87
- std::string CPIDByAddress (std::string address);
88
85
bool LoadAdminMessages (bool bFullTableScan,std::string& out_errors);
89
86
int64_t GetMaximumBoincSubsidy (int64_t nTime);
90
87
double GRCMagnitudeUnit (int64_t locktime);
@@ -110,7 +107,6 @@ void TestScan2();
110
107
bool AsyncNeuralRequest (std::string command_name,std::string cpid,int NodeLimit);
111
108
bool FullSyncWithDPORNodes ();
112
109
bool LoadSuperblock (std::string data, int64_t nTime, double height);
113
-
114
110
StructCPID GetInitializedStructCPID2 (std::string name,std::map<std::string, StructCPID>& vRef);
115
111
116
112
std::string GetNeuralNetworkSupermajorityHash (double & out_popularity);
@@ -1520,19 +1516,6 @@ bool AdvertiseBeacon(bool bFromService, std::string &sOutPrivKey, std::string &s
1520
1516
}
1521
1517
1522
1518
1523
-
1524
- std::string AcknowledgeHoldHarmlessClause ()
1525
- {
1526
- std::string GRCAddress = DefaultWalletAddress ();
1527
- bool bHarmlessClauseAcknowledged = UserAcknowledgedHoldHarmlessClause (GRCAddress);
1528
- if (bHarmlessClauseAcknowledged) return " SUCCESS" ;
1529
- std::string contract = GRCAddress;
1530
- std::string sAction = " add" ;
1531
- std::string sType = " holdharmless" ;
1532
- std::string result = AddContract (sType ,GRCAddress,contract);
1533
- return result;
1534
- }
1535
-
1536
1519
std::string ExecuteRPCCommand (std::string method, std::string arg1, std::string arg2, std::string arg3, std::string arg4, std::string arg5, std::string arg6)
1537
1520
{
1538
1521
Array params;
@@ -3939,78 +3922,6 @@ double GetMagnitudeByCpidFromLastSuperblock(std::string sCPID)
3939
3922
return 0 ;
3940
3923
}
3941
3924
3942
- std::string CryptoLottery (int64_t locktime)
3943
- {
3944
- std::string sOut = " " ;
3945
- std::string row = " " ;
3946
- int rows = 0 ;
3947
-
3948
- if (!bRemotePaymentsEnabled) return " " ;
3949
-
3950
- double max_subsidy = (double )GetMaximumBoincSubsidy (locktime);
3951
- vector<CPIDOwed> vCPIDSOwed;
3952
-
3953
- // int iRecord = 0;
3954
- for (map<string,StructCPID>::iterator ii=mvMagnitudes.begin (); ii!=mvMagnitudes.end (); ++ii)
3955
- {
3956
- StructCPID structMag = mvMagnitudes[(*ii).first ];
3957
- if (structMag.initialized && structMag.cpid .length () > 2 && structMag.cpid != " INVESTOR" && structMag.GRCAddress .length () > 5 )
3958
- {
3959
- CPIDOwed c;
3960
- c.owed = structMag.totalowed -structMag.payments ;
3961
- c.GRCAddress = structMag.GRCAddress ;
3962
- c.cpid = structMag.cpid ;
3963
- c.initialized = true ;
3964
- vCPIDSOwed.push_back (c);
3965
- }
3966
- }
3967
- // Sort by Max Owed descending:
3968
- std::sort (vCPIDSOwed.begin (), vCPIDSOwed.end (), SortByOwed);
3969
-
3970
- int nLastTally = (nBestHeight-CONSENSUS_LOOKBACK) - ( (nBestHeight-CONSENSUS_LOOKBACK) % BLOCK_GRANULARITY);
3971
- int height_since_last_tally = nBestHeight - CONSENSUS_LOOKBACK - nLastTally;
3972
- if (height_since_last_tally < 0 ) height_since_last_tally=0 ;
3973
- int iSkip = 0 ;
3974
- for (std::vector<CPIDOwed>::iterator it = vCPIDSOwed.begin (); it != vCPIDSOwed.end (); it++)
3975
- {
3976
- StructCPID structMag = mvMagnitudes[it->cpid ];
3977
- if (structMag.initialized && structMag.cpid .length () > 2 && structMag.cpid != " INVESTOR" && structMag.GRCAddress .length () > 5 )
3978
- {
3979
- double Owed = OwedByAddress (structMag.GRCAddress );
3980
- // Reverse Check, ensure Address resolves to cpid:
3981
- std::string reverse_cpid_lookup = CPIDByAddress (structMag.GRCAddress );
3982
- iSkip++;
3983
- if (reverse_cpid_lookup == structMag.cpid && Owed > (max_subsidy*4 ) && sOut .find (structMag.GRCAddress ) == std::string::npos && iSkip > height_since_last_tally)
3984
- {
3985
- // Gather the owed amount, grc address, and cpid.
3986
- // During block verification we will verify owed <> block_paid, grcaddress belongs to cpid, and cpid is owed > purported_owed
3987
- std::string row = " " ;
3988
- double tbp = Owed / 2 ;
3989
- if (tbp > max_subsidy) tbp=max_subsidy;
3990
- row = structMag.cpid + " ;" + structMag.GRCAddress + " ;" + RoundToString (tbp,2 );
3991
- sOut += row + " <COL>" ;
3992
- rows++;
3993
- if (rows >= 20 ) break ;
3994
- }
3995
- }
3996
-
3997
- }
3998
-
3999
-
4000
-
4001
- if (sOut .length () > 10 ) sOut = sOut .substr (0 ,sOut .length ()-5 ); // Remove last delimiter
4002
- if (fDebug3 ) printf (" CryptoLottery %s" ,sOut .c_str ());
4003
- if (rows < 15 ) sOut = " " ;
4004
- return sOut ;
4005
- }
4006
-
4007
-
4008
-
4009
- bool UserAcknowledgedHoldHarmlessClause (std::string sAddress )
4010
- {
4011
- std::string sHarmless = mvApplicationCache[" holdharmless;" + sAddress ];
4012
- return (!sHarmless .empty ());
4013
- }
4014
3925
4015
3926
bool IsContractSettled (std::string sContractType , std::string sOpra )
4016
3927
{
@@ -4953,7 +4864,7 @@ Value listitem(const Array& params, bool fHelp)
4953
4864
4954
4865
Object entry;
4955
4866
entry.push_back (Pair (" RSA Weight" ,RSAWEIGHT));
4956
- entry.push_back (Pair (" Remote Magnitude" ,out_magnitude));
4867
+ entry.push_back (Pair (" Magnitude" ,out_magnitude));
4957
4868
entry.push_back (Pair (" RSA Owed" ,out_owed));
4958
4869
results.push_back (entry);
4959
4870
@@ -4983,36 +4894,7 @@ Value listitem(const Array& params, bool fHelp)
4983
4894
entry.push_back (Pair (" Bad CPID with missing beacon" ,fResult ));
4984
4895
results.push_back (entry);
4985
4896
}
4986
- else if (sitem == " lottery" )
4987
- {
4988
-
4989
- Object entry;
4990
- std::string recipients = CryptoLottery (GetAdjustedTime ());
4991
- entry.push_back (Pair (" Recipients" ,recipients));
4992
- std::vector<std::string> vRecipients = split (recipients.c_str ()," <COL>" );
4993
- if (vRecipients.size () > 0 )
4994
- {
4995
- for (unsigned int i=0 ;i < vRecipients.size (); i++)
4996
- {
4997
- std::vector<std::string> vPayments = split (vRecipients[i].c_str ()," ;" );
4998
- // 0=script Pub Key, 1=negative amount, 2=coinstake
4999
- if (vPayments.size () == 3 )
5000
- {
5001
- std::string cpid = vPayments[0 ];
5002
- std::string grc_address = vPayments[1 ];
5003
- double amt = cdbl (vPayments[2 ],2 );
5004
- std::string CLcpid = CPIDByAddress (grc_address);
5005
- entry.push_back (Pair (" CPID" ,cpid));
5006
- entry.push_back (Pair (" CPID_VERIFY" ,CLcpid));
5007
- entry.push_back (Pair (" GRC_ADDRESS" ,grc_address));
5008
- entry.push_back (Pair (" Amount To Be Paid" ,amt));
5009
- }
5010
- }
5011
- }
5012
-
5013
- results.push_back (entry);
5014
- }
5015
- else if (sitem == " debugexplainmagnitude" )
4897
+ else if (sitem == " debugexplainmagnitude" )
5016
4898
{
5017
4899
double dMag = ExtractMagnitudeFromExplainMagnitude ();
5018
4900
Object entry;
0 commit comments