I am using geth server for transaction. After transaction is done i got new block but this block not having any field like transaction fees. So my confused about that is block having any field which gives me transaction fees or i have to calculate it manually. If its calculated manually then what is the right formula to calculate transaction fees and how to convert it into ether.
When i google for transaction fees I found two formulas to calculate transaction fees.
- gas * gasPrice = transacrion fees.
- gasUsed * gasPrice = transaction fees.
But gas and gasUsed are two different fields which have different values. So I am confused which formula is correct. Thanks in advance.