Merge branch 'pulls/177'

This commit is contained in:
clemahieu 2017-10-29 12:35:14 -05:00
commit f50ccbd46c
2 changed files with 15 additions and 4 deletions

View file

@ -256,6 +256,8 @@ rai::frontier_req_client::frontier_req_client (std::shared_ptr <rai::bootstrap_c
connection (connection_a),
current (0),
count (0),
landing ("059F68AAB29DE0D3A27443625C7EA9CDDB6517A8B76FE37727EF6A4D76832AD5"),
faucet ("8E319CE6F3025E5B2DF66DA7AB1467FE48F1679C13DD43BFDB29FA2E9FC40D3B"),
next_report (std::chrono::system_clock::now () + std::chrono::seconds (15))
{
rai::transaction transaction (connection->node->store.environment, nullptr, false);
@ -279,8 +281,17 @@ void rai::frontier_req_client::receive_frontier ()
void rai::frontier_req_client::request_account (rai::account const & account_a, rai::block_hash const & latest_a)
{
// Account they know about and we don't.
connection->attempt->pulls.push_back (rai::pull_info (account_a, latest_a, rai::block_hash (0)));
// Account they know about and we don't.
rai::account account_1 ("6B31E80CABDD2FEE6F54A7BDBF91B666010418F4438EF0B48168F93CD79DBC85"); // xrb_1tsjx18cqqbhxsqobbxxqyauesi31iehaiwgy4ta4t9s9mdsuh671npo1st9
rai::account account_2 ("FD6EE9E0E107A6A8584DB94A3F154799DD5C2A7D6ABED0889DA3B837B0E61663"); // xrb_3zdgx9ig43x8o3e6ugcc9wcnh8gxdio9ttoyt46buaxr8yrge7m5331qdwhk
if (account_a != landing && account_a != faucet && account_a != account_1 && account_a != account_2)
{
connection->attempt->pulls.push_back (rai::pull_info (account_a, latest_a, rai::block_hash (0)));
}
else
{
connection->attempt->pulls.push_front (rai::pull_info (account_a, latest_a, rai::block_hash (0)));
}
}
void rai::frontier_req_client::unsynced (MDB_txn * transaction_a, rai::block_hash const & ours_a, rai::block_hash const & theirs_a)
@ -348,8 +359,6 @@ void rai::frontier_req_client::received_frontier (boost::system::error_code cons
else
{
// They know about a block we don't.
rai::account landing ("059F68AAB29DE0D3A27443625C7EA9CDDB6517A8B76FE37727EF6A4D76832AD5");
rai::account faucet ("8E319CE6F3025E5B2DF66DA7AB1467FE48F1679C13DD43BFDB29FA2E9FC40D3B");
if (account != rai::genesis_account && account != landing && account != faucet)
{
connection->attempt->pulls.push_back (rai::pull_info (account, latest, info.head));

View file

@ -105,6 +105,8 @@ public:
rai::account current;
rai::account_info info;
unsigned count;
rai::account landing;
rai::account faucet;
std::chrono::system_clock::time_point next_report;
std::promise <bool> promise;
};