@@ -965,7 +965,6 @@ def get_consecutive_blocks(
965
965
block_list .append (full_block )
966
966
967
967
if include_transactions :
968
- prev_tx_height = full_block .height
969
968
for coin in full_block .get_included_reward_coins ():
970
969
if coin .puzzle_hash == self .farmer_ph :
971
970
pending_rewards .append (coin )
@@ -979,6 +978,7 @@ def get_consecutive_blocks(
979
978
980
979
if full_block .transactions_generator is not None :
981
980
tx_block_heights .append (full_block .height )
981
+ prev_tx_height = full_block .height
982
982
983
983
blocks_added_this_sub_slot += 1
984
984
blocks [full_block .header_hash ] = block_record
@@ -1259,7 +1259,6 @@ def get_consecutive_blocks(
1259
1259
block_list .append (full_block )
1260
1260
1261
1261
if include_transactions :
1262
- prev_tx_height = full_block .height
1263
1262
for coin in full_block .get_included_reward_coins ():
1264
1263
if coin .puzzle_hash == self .farmer_ph :
1265
1264
pending_rewards .append (coin )
@@ -1273,6 +1272,7 @@ def get_consecutive_blocks(
1273
1272
1274
1273
if full_block .transactions_generator is not None :
1275
1274
tx_block_heights .append (full_block .height )
1275
+ prev_tx_height = full_block .height
1276
1276
1277
1277
blocks_added_this_sub_slot += 1
1278
1278
blocks [full_block .header_hash ] = block_record
@@ -1759,6 +1759,7 @@ def load_block_list(
1759
1759
sub_slot_iters = uint64 (constants .SUB_SLOT_ITERS_STARTING )
1760
1760
height_to_hash : dict [uint32 , bytes32 ] = {}
1761
1761
blocks : dict [bytes32 , BlockRecord ] = {}
1762
+ prev_transaction_b_height = uint32 (0 )
1762
1763
for full_block in block_list :
1763
1764
if full_block .height != 0 :
1764
1765
if len (full_block .finished_sub_slots ) > 0 :
@@ -1775,7 +1776,6 @@ def load_block_list(
1775
1776
sp_hash = full_block .reward_chain_block .challenge_chain_sp_vdf .output .get_hash ()
1776
1777
1777
1778
cache = BlockCache (blocks )
1778
- prev_transaction_b_height = uint32 (0 ) # TODO: todo_v2_plots
1779
1779
1780
1780
required_iters = validate_pospace_and_get_required_iters (
1781
1781
constants ,
@@ -1789,6 +1789,9 @@ def load_block_list(
1789
1789
)
1790
1790
assert required_iters is not None
1791
1791
1792
+ if full_block .is_transaction_block ():
1793
+ prev_transaction_b_height = full_block .height
1794
+
1792
1795
blocks [full_block .header_hash ] = block_to_block_record (
1793
1796
constants ,
1794
1797
cache ,
0 commit comments