Eliminate recursive opening of transactions in unit tests.
Recursive transactions are unnecessary and will deadlock when memory protection is needed/added to ledger transactions.
This commit is contained in:
parent
2ac4aa79d8
commit
7cd86ccf62
2 changed files with 3 additions and 4 deletions
|
|
@ -650,8 +650,7 @@ TEST (wallet, work_generate)
|
||||||
}
|
}
|
||||||
nano::keypair key;
|
nano::keypair key;
|
||||||
auto block (wallet->send_action (nano::dev::genesis_key.pub, key.pub, 100));
|
auto block (wallet->send_action (nano::dev::genesis_key.pub, key.pub, 100));
|
||||||
auto transaction (node1.store.tx_begin_read ());
|
ASSERT_TIMELY (10s, node1.ledger.account_balance (node1.ledger.store.tx_begin_read (), nano::dev::genesis_key.pub) != amount1);
|
||||||
ASSERT_TIMELY (10s, node1.ledger.account_balance (transaction, nano::dev::genesis_key.pub) != amount1);
|
|
||||||
system.deadline_set (10s);
|
system.deadline_set (10s);
|
||||||
auto again (true);
|
auto again (true);
|
||||||
while (again)
|
while (again)
|
||||||
|
|
|
||||||
|
|
@ -5770,8 +5770,8 @@ TEST (rpc, block_confirmed)
|
||||||
|
|
||||||
// Open an account directly in the ledger
|
// Open an account directly in the ledger
|
||||||
{
|
{
|
||||||
auto transaction = node->store.tx_begin_write ();
|
auto transaction = node->ledger.store.tx_begin_write ();
|
||||||
nano::block_hash latest (node->latest (nano::dev::genesis_key.pub));
|
nano::block_hash latest (node->ledger.latest (transaction, nano::dev::genesis_key.pub));
|
||||||
auto send1 = builder
|
auto send1 = builder
|
||||||
.send ()
|
.send ()
|
||||||
.previous (latest)
|
.previous (latest)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue