Block builders can only be used once, initialize at top of loop. (#3232)
This commit is contained in:
parent
c6e52dab8f
commit
20bc36f863
2 changed files with 2 additions and 2 deletions
|
@ -65,9 +65,9 @@ TEST (network_filter, many)
|
|||
nano::genesis genesis;
|
||||
nano::network_filter filter (4);
|
||||
nano::keypair key1;
|
||||
nano::state_block_builder builder;
|
||||
for (int i = 0; i < 100; ++i)
|
||||
{
|
||||
nano::state_block_builder builder;
|
||||
auto block = builder
|
||||
.account (nano::dev_genesis_key.pub)
|
||||
.previous (genesis.open->hash ())
|
||||
|
|
|
@ -651,13 +651,13 @@ TEST (websocket, vote_options_representatives)
|
|||
|
||||
// Quick-confirm a block
|
||||
nano::keypair key;
|
||||
nano::state_block_builder builder;
|
||||
auto balance = nano::genesis_amount;
|
||||
system.wallet (0)->insert_adhoc (nano::dev_genesis_key.prv);
|
||||
auto send_amount = node1->online_reps.delta () + 1;
|
||||
auto confirm_block = [&] () {
|
||||
nano::block_hash previous (node1->latest (nano::dev_genesis_key.pub));
|
||||
balance -= send_amount;
|
||||
nano::state_block_builder builder;
|
||||
auto send = builder
|
||||
.account (nano::dev_genesis_key.pub)
|
||||
.previous (previous)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue