mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +01:00
Merge branch 'master' of https://github.com/darkcoinproject/darkcoin
This commit is contained in:
commit
cd9411951e
@ -46,7 +46,7 @@ match the project's coding conventions (see `doc/coding.txt`) or are
|
||||
controversial.
|
||||
|
||||
The `master` branch is regularly built and tested, but is not guaranteed to be
|
||||
completely stable. [Tags](https://github.com/bitcoin/bitcoin/tags) are created
|
||||
completely stable. [Tags](https://github.com/darkcoinproject/darkcoin/tags) are created
|
||||
regularly to indicate new official, stable release versions of DarkCoin.
|
||||
|
||||
Testing
|
||||
|
@ -774,7 +774,7 @@ if config.dmg is not None:
|
||||
items_positions.append(itemscript.substitute(params))
|
||||
|
||||
params = {
|
||||
"disk" : "Bitcoin-Qt",
|
||||
"disk" : "DarkCoin-Qt",
|
||||
"window_bounds" : "300,300,800,620",
|
||||
"icon_size" : "96",
|
||||
"background_commands" : "",
|
||||
|
@ -5840,12 +5840,15 @@ public:
|
||||
*/
|
||||
|
||||
|
||||
void CDarkSendPool::SetCollateralAddress(std::string strAddress){
|
||||
bool CDarkSendPool::SetCollateralAddress(std::string strAddress){
|
||||
CBitcoinAddress address;
|
||||
if (!address.SetString(strAddress))
|
||||
{
|
||||
printf("CDarkSendPool::SetCollateralAddress - Invalid DarkSend collateral address\n");
|
||||
|
||||
return false;
|
||||
}
|
||||
collateralPubKey.SetDestination(address.Get());
|
||||
return true;
|
||||
}
|
||||
|
||||
//Get last block hash
|
||||
|
@ -2516,7 +2516,7 @@ public:
|
||||
SetCollateralAddress(strAddress);
|
||||
}
|
||||
|
||||
void SetCollateralAddress(std::string strAddress);
|
||||
bool SetCollateralAddress(std::string strAddress);
|
||||
bool GetLastValidBlockHash(uint256& hash, int mod=10);
|
||||
int GetCurrentMasterNode(int mod=10);
|
||||
void NewBlock();
|
||||
|
38
src/net.cpp
38
src/net.cpp
@ -1196,38 +1196,16 @@ void MapPort(bool)
|
||||
// Each pair gives a source name and a seed name.
|
||||
// The first name is used as information source for addrman.
|
||||
// The second name should resolve to a list of seed addresses.
|
||||
|
||||
static const char *strMainNetDNSSeed[][2] = {
|
||||
{"", "23.23.186.131"}, //Evan's seed node
|
||||
{"drkpool.com", "162.252.83.46"},
|
||||
{"", "107.155.71.72"},
|
||||
{"", "50.16.206.102"},
|
||||
{"", "50.19.116.123"},
|
||||
{"", "98.165.130.67"},
|
||||
{"", "23.23.186.131"},
|
||||
{"", "50.16.206.102"},
|
||||
{"", "50.19.116.123"},
|
||||
{"", "50.19.116.123"},
|
||||
{"", "23.21.204.34"},
|
||||
{"", "188.142.39.105"},
|
||||
{"", "50.16.206.102"}, //InternetApe's seed node
|
||||
{"", "23.23.186.131"},
|
||||
{"", "50.19.116.123"},
|
||||
{"", "54.248.227.151"},
|
||||
{"", "42.121.58.91"},
|
||||
{"", "50.81.192.39"},
|
||||
{"", "54.193.124.32"},
|
||||
{"", "62.141.39.175"},
|
||||
{"", "5.254.96.3"},
|
||||
{"", "175.115.201.44"},
|
||||
{"", "208.53.191.2"},
|
||||
{"", "162.243.33.16"},
|
||||
{NULL, NULL},
|
||||
{"darkcoin.io", "dnsseed.darkcoin.io"},
|
||||
{"darkcoin.qa", "dnsseed.darkcoin.qa"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static const char *strTestNetDNSSeed[][2] = {
|
||||
{"", "23.23.186.131"},
|
||||
{NULL, NULL},
|
||||
{"darkcoin.io", "testnet-seed.darkcoin.io"},
|
||||
{"darkcoin.qa", "testnet-seed.darkcoin.qa"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
void ThreadDNSAddressSeed()
|
||||
@ -1937,7 +1915,7 @@ void RelayDarkSendElectionEntry(const CTxIn vin, const CService addr, const std:
|
||||
BOOST_FOREACH(CNode* pnode, vNodes)
|
||||
{
|
||||
pnode->PushMessage("dsee", vin, addr, vchSig, nNow, pubkey, pubkey2, count, current, lastUpdated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RelayDarkSendElectionEntryPing(const CTxIn vin, const std::vector<unsigned char> vchSig, const int64 nNow, const bool stop)
|
||||
@ -1946,5 +1924,5 @@ void RelayDarkSendElectionEntryPing(const CTxIn vin, const std::vector<unsigned
|
||||
BOOST_FOREACH(CNode* pnode, vNodes)
|
||||
{
|
||||
pnode->PushMessage("dseep", vin, vchSig, nNow, stop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,36 @@ BOOST_AUTO_TEST_CASE(darksend_sign)
|
||||
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(set_collateral_address_bad)
|
||||
{
|
||||
CDarkSendPool * dsp_ptr = new CDarkSendPool();
|
||||
|
||||
string crappy = "badaddress";
|
||||
|
||||
BOOST_CHECK( dsp_ptr->SetCollateralAddress(crappy) == false );
|
||||
delete dsp_ptr;
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(set_collateral_address_production)
|
||||
{
|
||||
CDarkSendPool * dsp_ptr = new CDarkSendPool();
|
||||
|
||||
string prod = "Xq19GqFvajRrEdDHYRKGYjTsQfpV5jyipF";
|
||||
|
||||
BOOST_CHECK( dsp_ptr->SetCollateralAddress(prod) == true );
|
||||
delete dsp_ptr;
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(set_collateral_address_testnet)
|
||||
{
|
||||
CDarkSendPool * dsp_ptr = new CDarkSendPool();
|
||||
|
||||
string testnet = "mxE2Rp3oYpSEFdsN5TdHWhZvEHm3PJQQVm";
|
||||
|
||||
BOOST_CHECK( dsp_ptr->SetCollateralAddress(testnet) == true );
|
||||
delete dsp_ptr;
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(darksend_vote)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user