mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +01:00
changes to test masternode ranking
This commit is contained in:
parent
07ccf2282a
commit
75046e1ae6
@ -13,7 +13,7 @@ packages:
|
||||
- "faketime"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/darkcoin-project/darkcoin.git"
|
||||
- "url": "https://github.com/darkcoinproject/darkcoin.git"
|
||||
"dir": "darkcoin"
|
||||
files:
|
||||
- "qt-win32-4.8.3-gitian-r4.zip"
|
||||
|
@ -20,7 +20,7 @@ packages:
|
||||
- "libpng12-dev"
|
||||
reference_datetime: "2011-01-30 00:00:00"
|
||||
remotes:
|
||||
- "url": "https://github.com/darkcoin-project/darkcoin.git"
|
||||
- "url": "https://github.com/darkcoinproject/darkcoin.git"
|
||||
"dir": "darkcoin"
|
||||
files:
|
||||
- "miniupnpc-1.6.tar.gz"
|
||||
|
@ -4160,7 +4160,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2;
|
||||
std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey;
|
||||
|
||||
CScript pubkeyScript2;
|
||||
pubkeyScript2.SetDestination(pubkey2.GetID());
|
||||
|
@ -2581,7 +2581,7 @@ static const int64 POOL_FEE_AMOUNT = 0.025*COIN;
|
||||
class CDarkSendPool
|
||||
{
|
||||
public:
|
||||
static const int MIN_PEER_PROTO_VERSION = 70019;
|
||||
static const int MIN_PEER_PROTO_VERSION = 70018;
|
||||
|
||||
std::vector<CDarkSendEntry> myEntries;
|
||||
std::vector<CDarkSendEntry> entries;
|
||||
|
@ -104,7 +104,7 @@ Value masternode(const Array& params, bool fHelp)
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
if (strCommand == "list")
|
||||
if (strCommand == "list")
|
||||
{
|
||||
std::string strCommand = "active";
|
||||
|
||||
@ -112,9 +112,9 @@ if (strCommand == "list")
|
||||
strCommand = params[1].get_str().c_str();
|
||||
}
|
||||
|
||||
if (strCommand != "active" && strCommand != "vin" && strCommand != "pubkey" && strCommand != "lastseen" && strCommand != "activeseconds"){
|
||||
if (strCommand != "active" && strCommand != "vin" && strCommand != "pubkey" && strCommand != "lastseen" && strCommand != "activeseconds" && strCommand != "rank"){
|
||||
throw runtime_error(
|
||||
"list supports 'active', 'vin', 'pubkey', 'lastseen', 'activeseconds'\n");
|
||||
"list supports 'active', 'vin', 'pubkey', 'lastseen', 'activeseconds', 'rank'\n");
|
||||
}
|
||||
|
||||
Object obj;
|
||||
@ -137,6 +137,8 @@ if (strCommand == "list")
|
||||
obj.push_back(Pair(mn.addr.ToString().c_str(), (int64_t)mn.lastTimeSeen));
|
||||
} else if (strCommand == "activeseconds") {
|
||||
obj.push_back(Pair(mn.addr.ToString().c_str(), (int64_t)(mn.lastTimeSeen - mn.now)/(1000*1000)));
|
||||
} else if (strCommand == "rank") {
|
||||
obj.push_back(Pair(mn.addr.ToString().c_str(), (int)(darkSendPool.GetMasternodeRank(mn.vin, 1))));
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
|
@ -25,7 +25,7 @@ extern const std::string CLIENT_DATE;
|
||||
// network protocol versioning
|
||||
//
|
||||
|
||||
static const int PROTOCOL_VERSION = 70019;
|
||||
static const int PROTOCOL_VERSION = 70018;
|
||||
|
||||
// intial proto version, to be increased after version/verack negotiation
|
||||
static const int INIT_PROTO_VERSION = 209;
|
||||
|
Loading…
Reference in New Issue
Block a user