@@ -647,6 +647,8 @@ def calculate_tx_fee(
647647 invalid_before : int | None = None ,
648648 src_addr_utxos : list [structs .UTXOData ] | None = None ,
649649 witness_count_add : int = 0 ,
650+ byron_witness_count : int = 0 ,
651+ reference_script_size : int = 0 ,
650652 join_txouts : bool = True ,
651653 destination_dir : itp .FileType = "." ,
652654 ) -> int :
@@ -690,6 +692,8 @@ def calculate_tx_fee(
690692 src_addr_utxos: A list of UTxOs for the source address (optional).
691693 witness_count_add: A number of witnesses to add - workaround to make the fee
692694 calculation more precise.
695+ byron_witness_count: A number of Byron witnesses (optional).
696+ reference_script_size: A size in bytes of transaction reference scripts (optional).
693697 join_txouts: A bool indicating whether to aggregate transaction outputs
694698 by payment address (True by default).
695699 destination_dir: A path to directory for storing artifacts (optional).
@@ -744,6 +748,8 @@ def calculate_tx_fee(
744748 txin_count = len (tx_raw_output .txins ) + 1 ,
745749 txout_count = len (tx_raw_output .txouts ),
746750 witness_count = len (tx_files .signing_key_files ) + witness_count_add ,
751+ byron_witness_count = byron_witness_count ,
752+ reference_script_size = reference_script_size ,
747753 )
748754
749755 return fee
0 commit comments