@@ -103,10 +103,9 @@ try {
103103 create_operation.fee = db.get_global_properties ().parameters .current_fees ->calculate_fee (create_operation);
104104 trx.operations .push_back (create_operation);
105105 sign (trx, alice_private_key);
106- PUSH_TX (db, trx, ~0 );
106+ processed_transaction alice_trx = PUSH_TX (db, trx, ~0 );
107107 trx.clear ();
108- graphene::chain::signed_block blk = generate_block ();
109- processed_transaction alice_trx = blk.transactions [0 ];
108+ generate_block ();
110109 alice_htlc_id = alice_trx.operation_results [0 ].get <object_id_type>();
111110 generate_block ();
112111 }
@@ -553,10 +552,9 @@ try {
553552 create_operation.fee = db.current_fee_schedule ().calculate_fee ( create_operation );
554553 trx.operations .push_back ( create_operation );
555554 sign (trx, alice_private_key);
556- PUSH_TX (db, trx, ~0 );
555+ processed_transaction alice_trx = PUSH_TX (db, trx, ~0 );
557556 trx.clear ();
558- graphene::chain::signed_block blk = generate_block ();
559- processed_transaction alice_trx = blk.transactions [0 ];
557+ generate_block ();
560558 alice_htlc_id = alice_trx.operation_results [0 ].get <object_id_type>();
561559 }
562560
@@ -1053,10 +1051,9 @@ try {
10531051 trx.operations .push_back ( create_operation );
10541052 sign (trx, alice_private_key);
10551053 // bob can now accept it, so it works
1056- PUSH_TX ( db, trx, ~0 );
1054+ processed_transaction alice_trx = PUSH_TX ( db, trx, ~0 );
10571055 trx.clear ();
1058- graphene::chain::signed_block blk = generate_block ();
1059- processed_transaction alice_trx = blk.transactions [0 ];
1056+ generate_block ();
10601057 alice_htlc_id = alice_trx.operation_results [0 ].get <object_id_type>();
10611058 }
10621059
@@ -1129,11 +1126,10 @@ try {
11291126 create_operation.fee = db.get_global_properties ().parameters .current_fees ->calculate_fee (create_operation);
11301127 trx.operations .push_back (create_operation);
11311128 sign (trx, alice_private_key);
1132- PUSH_TX (db, trx, ~0 );
1129+ processed_transaction alice_trx = PUSH_TX (db, trx, ~0 );
11331130 trx.clear ();
11341131 set_expiration ( db, trx );
1135- graphene::chain::signed_block blk = generate_block ();
1136- processed_transaction alice_trx = blk.transactions [0 ];
1132+ generate_block ();
11371133 alice_htlc_id_bob = alice_trx.operation_results [0 ].get <object_id_type>();
11381134 generate_block ();
11391135 set_expiration ( db, trx );
@@ -1153,11 +1149,10 @@ try {
11531149 create_operation.fee = db.get_global_properties ().parameters .current_fees ->calculate_fee (create_operation);
11541150 trx.operations .push_back (create_operation);
11551151 sign (trx, alice_private_key);
1156- PUSH_TX (db, trx, ~0 );
1152+ processed_transaction alice_trx = PUSH_TX (db, trx, ~0 );
11571153 trx.clear ();
11581154 set_expiration ( db, trx );
1159- graphene::chain::signed_block blk = generate_block ();
1160- processed_transaction alice_trx = blk.transactions [0 ];
1155+ generate_block ();
11611156 alice_htlc_id_carl = alice_trx.operation_results [0 ].get <object_id_type>();
11621157 generate_block ();
11631158 set_expiration ( db, trx );
@@ -1177,11 +1172,10 @@ try {
11771172 create_operation.fee = db.get_global_properties ().parameters .current_fees ->calculate_fee (create_operation);
11781173 trx.operations .push_back (create_operation);
11791174 sign (trx, alice_private_key);
1180- PUSH_TX (db, trx, ~0 );
1175+ processed_transaction alice_trx = PUSH_TX (db, trx, ~0 );
11811176 trx.clear ();
11821177 set_expiration ( db, trx );
1183- graphene::chain::signed_block blk = generate_block ();
1184- processed_transaction alice_trx = blk.transactions [0 ];
1178+ generate_block ();
11851179 alice_htlc_id_dan = alice_trx.operation_results [0 ].get <object_id_type>();
11861180 generate_block ();
11871181 set_expiration ( db, trx );
0 commit comments