diff options
author | Maran <maran.hidskes@gmail.com> | 2014-06-11 17:40:50 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-06-11 17:40:50 +0800 |
commit | 71ab5d52b692a42cc3af034e5ff1aab5b4b6477d (patch) | |
tree | e3711f1767a910f642a9dde734c4245041ea8151 /ethpub | |
parent | e090d131c38bef3c5f2d0f5e9fa28f5d0ed06659 (diff) | |
download | go-tangerine-71ab5d52b692a42cc3af034e5ff1aab5b4b6477d.tar go-tangerine-71ab5d52b692a42cc3af034e5ff1aab5b4b6477d.tar.gz go-tangerine-71ab5d52b692a42cc3af034e5ff1aab5b4b6477d.tar.bz2 go-tangerine-71ab5d52b692a42cc3af034e5ff1aab5b4b6477d.tar.lz go-tangerine-71ab5d52b692a42cc3af034e5ff1aab5b4b6477d.tar.xz go-tangerine-71ab5d52b692a42cc3af034e5ff1aab5b4b6477d.tar.zst go-tangerine-71ab5d52b692a42cc3af034e5ff1aab5b4b6477d.zip |
Exposed usedGas through ethPub
Diffstat (limited to 'ethpub')
-rw-r--r-- | ethpub/types.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ethpub/types.go b/ethpub/types.go index 40ac32a27..868fd2713 100644 --- a/ethpub/types.go +++ b/ethpub/types.go @@ -47,6 +47,7 @@ type PBlock struct { Time int64 `json:"time"` Coinbase string `json:"coinbase"` GasLimit string `json:"gasLimit"` + GasUsed string `json:"gasUsed"` } // Creates a new QML Block from a chain block @@ -65,7 +66,7 @@ func NewPBlock(block *ethchain.Block) *PBlock { return nil } - return &PBlock{ref: block, Number: int(block.Number.Uint64()), GasLimit: block.GasLimit.String(), Hash: ethutil.Hex(block.Hash()), Transactions: string(txJson), Time: block.Time, Coinbase: ethutil.Hex(block.Coinbase)} + return &PBlock{ref: block, Number: int(block.Number.Uint64()), GasUsed: block.GasUsed.String(), GasLimit: block.GasLimit.String(), Hash: ethutil.Hex(block.Hash()), Transactions: string(txJson), Time: block.Time, Coinbase: ethutil.Hex(block.Coinbase)} } func (self *PBlock) ToString() string { |