diff options
author | tsarpaul <Litvakpol@012.net.il> | 2017-11-17 21:07:57 +0800 |
---|---|---|
committer | tsarpaul <Litvakpol@012.net.il> | 2017-11-17 21:07:57 +0800 |
commit | c7b0abf86bf3039a87b5b5ae88635326a762cf31 (patch) | |
tree | 545c22b0387fd00e12ff69ac728885d76eaa5ff9 | |
parent | c5b8569707cabe19f861cb67062c07598aff2aa1 (diff) | |
download | dexon-c7b0abf86bf3039a87b5b5ae88635326a762cf31.tar dexon-c7b0abf86bf3039a87b5b5ae88635326a762cf31.tar.gz dexon-c7b0abf86bf3039a87b5b5ae88635326a762cf31.tar.bz2 dexon-c7b0abf86bf3039a87b5b5ae88635326a762cf31.tar.lz dexon-c7b0abf86bf3039a87b5b5ae88635326a762cf31.tar.xz dexon-c7b0abf86bf3039a87b5b5ae88635326a762cf31.tar.zst dexon-c7b0abf86bf3039a87b5b5ae88635326a762cf31.zip |
Added output to clarify gas calculation in txpool.inspect
-rw-r--r-- | internal/ethapi/api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index cf15d1c71..025f42617 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -151,9 +151,9 @@ func (s *PublicTxPoolAPI) Inspect() map[string]map[string]map[string]string { // Define a formatter to flatten a transaction into a string var format = func(tx *types.Transaction) string { if to := tx.To(); to != nil { - return fmt.Sprintf("%s: %v wei + %v × %v gas", tx.To().Hex(), tx.Value(), tx.Gas(), tx.GasPrice()) + return fmt.Sprintf("%s: %v wei + %v gas × %v wei", tx.To().Hex(), tx.Value(), tx.Gas(), tx.GasPrice()) } - return fmt.Sprintf("contract creation: %v wei + %v × %v gas", tx.Value(), tx.Gas(), tx.GasPrice()) + return fmt.Sprintf("contract creation: %v wei + %v gas × %v wei", tx.Value(), tx.Gas(), tx.GasPrice()) } // Flatten the pending transactions for account, txs := range pending { |