Skip to content

Commit

Permalink
merging v25
Browse files Browse the repository at this point in the history
  • Loading branch information
coranos committed May 26, 2023
1 parent e0dcb91 commit fd6b815
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions nano/core_test/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ TEST (node, DISABLED_fork_stale)
.account (nano::dev::genesis_key.pub)
.previous (nano::dev::genesis->hash ())
.representative (nano::dev::genesis_key.pub)
.balance (nano::dev::constants.genesis_amount - nano::Mxrb_ratio)
.balance (nano::dev::constants.genesis_amount - nano::BAN_ratio)
.link (key1.pub)
.sign (nano::dev::genesis_key.prv, nano::dev::genesis_key.pub)
.work (0)
Expand All @@ -1201,7 +1201,7 @@ TEST (node, DISABLED_fork_stale)
.account (nano::dev::genesis_key.pub)
.previous (send3->hash ())
.representative (nano::dev::genesis_key.pub)
.balance (nano::dev::constants.genesis_amount - 2 * nano::Mxrb_ratio)
.balance (nano::dev::constants.genesis_amount - 2 * nano::BAN_ratio)
.link (key1.pub)
.sign (nano::dev::genesis_key.prv, nano::dev::genesis_key.pub)
.work (0)
Expand All @@ -1211,7 +1211,7 @@ TEST (node, DISABLED_fork_stale)
.account (nano::dev::genesis_key.pub)
.previous (send3->hash ())
.representative (nano::dev::genesis_key.pub)
.balance (nano::dev::constants.genesis_amount - 2 * nano::Mxrb_ratio)
.balance (nano::dev::constants.genesis_amount - 2 * nano::BAN_ratio)
.link (key2.pub)
.sign (nano::dev::genesis_key.prv, nano::dev::genesis_key.pub)
.work (0)
Expand Down Expand Up @@ -1615,13 +1615,13 @@ TEST (node, unconfirmed_send)

// firstly, send two units from node1 to node2 and expect that both nodes see the block as confirmed
// (node1 will start an election for it, vote on it and node2 gets synced up)
auto send1 = wallet1->send_action (nano::dev::genesis->account (), key2.pub, 2 * nano::Mxrb_ratio);
auto send1 = wallet1->send_action (nano::dev::genesis->account (), key2.pub, 2 * nano::BAN_ratio);
ASSERT_TIMELY (5s, node1.block_confirmed (send1->hash ()));
ASSERT_TIMELY (5s, node2.block_confirmed (send1->hash ()));

// wait until receive1 (auto-receive created by wallet) is cemented
ASSERT_TIMELY (5s, node2.get_confirmation_height (node2.store.tx_begin_read (), key2.pub) == 1);
ASSERT_EQ (node2.balance (key2.pub), 2 * nano::Mxrb_ratio);
ASSERT_EQ (node2.balance (key2.pub), 2 * nano::BAN_ratio);
auto recv1 = node2.ledger.find_receive_block_by_send_hash (node2.store.tx_begin_read (), key2.pub, send1->hash ());

// create send2 to send from node2 to node1 and save it to node2's ledger without triggering an election (node1 does not hear about it)
Expand All @@ -1630,14 +1630,14 @@ TEST (node, unconfirmed_send)
.account (key2.pub)
.previous (recv1->hash ())
.representative (nano::dev::genesis_key.pub)
.balance (nano::Mxrb_ratio)
.balance (nano::BAN_ratio)
.link (nano::dev::genesis->account ())
.sign (key2.prv, key2.pub)
.work (*system.work.generate (recv1->hash ()))
.build_shared ();
ASSERT_EQ (nano::process_result::progress, node2.process (*send2).code);

auto send3 = wallet2->send_action (key2.pub, nano::dev::genesis->account (), nano::Mxrb_ratio);
auto send3 = wallet2->send_action (key2.pub, nano::dev::genesis->account (), nano::BAN_ratio);
ASSERT_TIMELY (5s, node2.block_confirmed (send2->hash ()));
ASSERT_TIMELY (5s, node1.block_confirmed (send2->hash ()));
ASSERT_TIMELY (5s, node2.block_confirmed (send3->hash ()));
Expand All @@ -1657,7 +1657,7 @@ TEST (node, rep_list)
wallet0->insert_adhoc (nano::dev::genesis_key.prv);
nano::keypair key1;
// Broadcast a confirm so others should know this is a rep node
wallet0->send_action (nano::dev::genesis_key.pub, key1.pub, nano::Mxrb_ratio);
wallet0->send_action (nano::dev::genesis_key.pub, key1.pub, nano::BAN_ratio);
ASSERT_EQ (0, node1.rep_crawler.representatives (1).size ());
system.deadline_set (10s);
auto done (false);
Expand Down Expand Up @@ -1912,7 +1912,7 @@ TEST (node, no_voting)
nano::keypair key1;
wallet1->insert_adhoc (key1.prv);
// Broadcast a confirm so others should know this is a rep node
wallet1->send_action (nano::dev::genesis_key.pub, key1.pub, nano::Mxrb_ratio);
wallet1->send_action (nano::dev::genesis_key.pub, key1.pub, nano::BAN_ratio);
ASSERT_TIMELY (10s, node0.active.empty ());
ASSERT_EQ (0, node0.stats.count (nano::stat::type::message, nano::stat::detail::confirm_ack, nano::stat::dir::in));
}
Expand Down

0 comments on commit fd6b815

Please sign in to comment.