pub fn tx_fee(tx: &Transaction) -> u64
Calculates the fee of the [Transaction].
Transaction
This will panic if the inputs overflow or the transaction outputs too much, so should only be used on known to be valid txs.