Closed semuxgo closed 5 years ago
One drawback is that we won't be able to get these data for pending transactions.
Gas supplied and price bid for gasprice are part of transaction signed. I'm not sure one can remove them, as sig won't match. GasUsed def belongs in results.. I do worry about including them in tx result (in db) as it would be more space. For API, I could go either way. Usually when I care about gas after the fact, I'd like to see gas and GasUsed in same web call
Gas price and gas are not really removable from the transaction. They are user specified, so we will always have them in code for sorting pending txs
Agreed. Let's add gas
and gasPrice
into the /transaction
response.
I thought about this before. Logically, it should be parts of the transaction response, since it's part of the transaction.
My main concern is about API compatibility break. For now, we expose the
gas
,gasPrice
,gasUsed
in the transaction result response.Write up this issue to note the trade-off.