@@ -34,22 +34,6 @@ def get_empty_inclusion_list(spec, store, state, slot=None, validator_index=None
3434 return empty_inclusion_list
3535
3636
37- def get_empty_signed_inclusion_list (
38- spec ,
39- store ,
40- state ,
41- slot = None ,
42- validator_index = None ,
43- ):
44- """
45- Build an empty signed inclusion list for ``slot``. Slot must be greater than or equal to the current slot in ``state``.
46- """
47- empty_inclusion_list = get_empty_inclusion_list (spec , store , state , slot , validator_index )
48- signed_inclusion_list = sign_inclusion_list (spec , state , empty_inclusion_list )
49-
50- return signed_inclusion_list
51-
52-
5337def get_sample_inclusion_list (
5438 spec ,
5539 store ,
@@ -107,14 +91,13 @@ def get_sample_transactions(spec, max_transaction_size=200, max_transaction_coun
10791 """
10892 Build a list of sample transactions.
10993 """
110- transaction_size = min (
111- max_transaction_size , spec .config .MAX_TRANSACTIONS_BYTES_PER_INCLUSION_LIST
94+ # Transactions must be non-empty and their total size within the bound
95+ transaction_size = max (
96+ 1 , min (max_transaction_size , spec .config .MAX_TRANSACTIONS_BYTES_PER_INCLUSION_LIST )
11297 )
11398 transaction_count = min (
11499 max_transaction_count ,
115- spec .config .MAX_TRANSACTIONS_BYTES_PER_INCLUSION_LIST // transaction_size
116- if transaction_size
117- else spec .config .MAX_TRANSACTIONS_BYTES_PER_INCLUSION_LIST ,
100+ spec .config .MAX_TRANSACTIONS_BYTES_PER_INCLUSION_LIST // transaction_size ,
118101 )
119102
120103 assert transaction_size >= 0
0 commit comments