aboutsummaryrefslogtreecommitdiffstats
path: root/ethpub
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-12 03:56:59 +0800
committerobscuren <geffobscura@gmail.com>2014-06-12 03:56:59 +0800
commit8a2e50ab2a6c903a6ab3ab10a74c37e1f3b8f3f1 (patch)
tree3cf67a559ef450500ddfd7df9d457f3e1a994caf /ethpub
parent9ee6295c752a518603de01e4feaec787c61a5dcf (diff)
parent1938bfcddfd2722880a692c59cad344b611711c8 (diff)
downloadgo-tangerine-8a2e50ab2a6c903a6ab3ab10a74c37e1f3b8f3f1.tar
go-tangerine-8a2e50ab2a6c903a6ab3ab10a74c37e1f3b8f3f1.tar.gz
go-tangerine-8a2e50ab2a6c903a6ab3ab10a74c37e1f3b8f3f1.tar.bz2
go-tangerine-8a2e50ab2a6c903a6ab3ab10a74c37e1f3b8f3f1.tar.lz
go-tangerine-8a2e50ab2a6c903a6ab3ab10a74c37e1f3b8f3f1.tar.xz
go-tangerine-8a2e50ab2a6c903a6ab3ab10a74c37e1f3b8f3f1.tar.zst
go-tangerine-8a2e50ab2a6c903a6ab3ab10a74c37e1f3b8f3f1.zip
Merge branch 'develop' into interop
Conflicts: peer.go
Diffstat (limited to 'ethpub')
-rw-r--r--ethpub/types.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/ethpub/types.go b/ethpub/types.go
index 6893c7e09..868fd2713 100644
--- a/ethpub/types.go
+++ b/ethpub/types.go
@@ -46,6 +46,8 @@ type PBlock struct {
Transactions string `json:"transactions"`
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
@@ -64,7 +66,7 @@ func NewPBlock(block *ethchain.Block) *PBlock {
return nil
}
- return &PBlock{ref: block, Number: int(block.Number.Uint64()), 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 {