Skip to content

Commit c7b0abf

Browse files
tsarpaultsarpaul
authored andcommitted
Added output to clarify gas calculation in txpool.inspect
1 parent c5b8569 commit c7b0abf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/ethapi/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ func (s *PublicTxPoolAPI) Inspect() map[string]map[string]map[string]string {
151151
// Define a formatter to flatten a transaction into a string
152152
var format = func(tx *types.Transaction) string {
153153
if to := tx.To(); to != nil {
154-
return fmt.Sprintf("%s: %v wei + %v × %v gas", tx.To().Hex(), tx.Value(), tx.Gas(), tx.GasPrice())
154+
return fmt.Sprintf("%s: %v wei + %v gas × %v wei", tx.To().Hex(), tx.Value(), tx.Gas(), tx.GasPrice())
155155
}
156-
return fmt.Sprintf("contract creation: %v wei + %v × %v gas", tx.Value(), tx.Gas(), tx.GasPrice())
156+
return fmt.Sprintf("contract creation: %v wei + %v gas × %v wei", tx.Value(), tx.Gas(), tx.GasPrice())
157157
}
158158
// Flatten the pending transactions
159159
for account, txs := range pending {

0 commit comments

Comments
 (0)