Fixing formatting.
This commit is contained in:
parent
63e15c21ae
commit
8b036d26e6
3 changed files with 7 additions and 7 deletions
|
@ -750,9 +750,9 @@ TEST (votes, check_signature)
|
|||
auto votes1 (node1.active.roots.find (send1->root ())->election);
|
||||
ASSERT_EQ (1, votes1->votes.rep_votes.size ());
|
||||
auto vote1 (std::make_shared<rai::vote> (rai::test_genesis_key.pub, rai::test_genesis_key.prv, 1, send1));
|
||||
vote1->signature.bytes [0] ^= 1;
|
||||
vote1->signature.bytes[0] ^= 1;
|
||||
ASSERT_EQ (rai::vote_code::invalid, node1.vote_processor.vote (vote1, rai::endpoint ()).code);
|
||||
vote1->signature.bytes [0] ^= 1;
|
||||
vote1->signature.bytes[0] ^= 1;
|
||||
ASSERT_EQ (rai::vote_code::vote, node1.vote_processor.vote (vote1, rai::endpoint ()).code);
|
||||
ASSERT_EQ (rai::vote_code::replay, node1.vote_processor.vote (vote1, rai::endpoint ()).code);
|
||||
}
|
||||
|
|
|
@ -984,17 +984,17 @@ TEST (wallet, utx_implicit_generate)
|
|||
rai::system system (24000, 1);
|
||||
system.wallet (0)->insert_adhoc (rai::test_genesis_key.prv);
|
||||
rai::genesis genesis;
|
||||
system.nodes [0]->ledger.utx_parse_canary = genesis.hash ();
|
||||
system.nodes[0]->ledger.utx_parse_canary = genesis.hash ();
|
||||
{
|
||||
rai::transaction transaction (system.nodes [0]->store.environment, nullptr, true);
|
||||
rai::transaction transaction (system.nodes[0]->store.environment, nullptr, true);
|
||||
ASSERT_FALSE (system.wallet (0)->should_generate_utx (transaction, genesis.hash ()));
|
||||
rai::utx_block block (rai::test_genesis_key.pub, genesis.hash (), rai::test_genesis_key.pub, rai::genesis_amount - rai::Gxrb_ratio, rai::test_genesis_key.pub, rai::test_genesis_key.prv, rai::test_genesis_key.pub, 0);
|
||||
ASSERT_EQ (rai::process_result::progress, system.nodes [0]->ledger.process (transaction, block).code);
|
||||
ASSERT_EQ (rai::process_result::progress, system.nodes[0]->ledger.process (transaction, block).code);
|
||||
ASSERT_TRUE (system.wallet (0)->should_generate_utx (transaction, block.hash ()));
|
||||
}
|
||||
ASSERT_FALSE (system.wallet (0)->search_pending ());
|
||||
auto iterations (0);
|
||||
while (system.nodes [0]->balance (rai::test_genesis_key.pub) != rai::genesis_amount)
|
||||
while (system.nodes[0]->balance (rai::test_genesis_key.pub) != rai::genesis_amount)
|
||||
{
|
||||
system.poll ();
|
||||
++iterations;
|
||||
|
|
|
@ -1054,7 +1054,7 @@ std::shared_ptr<rai::block> rai::wallet::send_action (rai::account const & sourc
|
|||
|
||||
bool rai::wallet::should_generate_utx (MDB_txn * transaction_a, rai::block_hash const & hash_a)
|
||||
{
|
||||
auto head (node.store.block_get(transaction_a, hash_a));
|
||||
auto head (node.store.block_get (transaction_a, hash_a));
|
||||
assert (head != nullptr);
|
||||
auto is_utx (dynamic_cast<rai::utx_block *> (head.get ()) != nullptr);
|
||||
return is_utx || node.ledger.utx_generation_enabled (transaction_a);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue