Remove node::rep_block function that was only used in tests. (#4444)
This commit is contained in:
parent
40306635ec
commit
ca31348b96
4 changed files with 0 additions and 38 deletions
|
@ -115,18 +115,6 @@ TEST (node, balance)
|
|||
ASSERT_EQ (std::numeric_limits<nano::uint128_t>::max (), system.nodes[0]->ledger.account_balance (transaction, nano::dev::genesis_key.pub));
|
||||
}
|
||||
|
||||
TEST (node, representative)
|
||||
{
|
||||
nano::test::system system (1);
|
||||
auto block1 (system.nodes[0]->rep_block (nano::dev::genesis_key.pub));
|
||||
{
|
||||
auto transaction (system.nodes[0]->store.tx_begin_read ());
|
||||
ASSERT_TRUE (system.nodes[0]->ledger.store.block.exists (transaction, block1));
|
||||
}
|
||||
nano::keypair key;
|
||||
ASSERT_TRUE (system.nodes[0]->rep_block (key.pub).is_zero ());
|
||||
}
|
||||
|
||||
TEST (node, send_unkeyed)
|
||||
{
|
||||
nano::test::system system (1);
|
||||
|
|
|
@ -223,19 +223,6 @@ TEST (wallet, spend)
|
|||
ASSERT_EQ (0, node1.balance (nano::dev::genesis_key.pub));
|
||||
}
|
||||
|
||||
TEST (wallet, change)
|
||||
{
|
||||
nano::test::system system (1);
|
||||
system.wallet (0)->insert_adhoc (nano::dev::genesis_key.prv);
|
||||
nano::keypair key2;
|
||||
auto block1 (system.nodes[0]->rep_block (nano::dev::genesis_key.pub));
|
||||
ASSERT_FALSE (block1.is_zero ());
|
||||
ASSERT_NE (nullptr, system.wallet (0)->change_action (nano::dev::genesis_key.pub, key2.pub));
|
||||
auto block2 (system.nodes[0]->rep_block (nano::dev::genesis_key.pub));
|
||||
ASSERT_FALSE (block2.is_zero ());
|
||||
ASSERT_NE (block1, block2);
|
||||
}
|
||||
|
||||
TEST (wallet, partial_spend)
|
||||
{
|
||||
nano::test::system system (1);
|
||||
|
|
|
@ -744,18 +744,6 @@ nano::uint128_t nano::node::weight (nano::account const & account_a)
|
|||
return ledger.weight (account_a);
|
||||
}
|
||||
|
||||
nano::block_hash nano::node::rep_block (nano::account const & account_a)
|
||||
{
|
||||
auto const transaction (store.tx_begin_read ());
|
||||
nano::block_hash result (0);
|
||||
auto info = ledger.account_info (transaction, account_a);
|
||||
if (info)
|
||||
{
|
||||
result = ledger.representative (transaction, info->head);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
nano::uint128_t nano::node::minimum_principal_weight ()
|
||||
{
|
||||
return online_reps.trended () / network_params.network.principal_weight_factor;
|
||||
|
|
|
@ -92,7 +92,6 @@ public:
|
|||
std::shared_ptr<nano::block> block (nano::block_hash const &);
|
||||
std::pair<nano::uint128_t, nano::uint128_t> balance_pending (nano::account const &, bool only_confirmed);
|
||||
nano::uint128_t weight (nano::account const &);
|
||||
nano::block_hash rep_block (nano::account const &);
|
||||
nano::uint128_t minimum_principal_weight ();
|
||||
void ongoing_rep_calculation ();
|
||||
void ongoing_bootstrap ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue