good morning!!!!

Skip to content
Snippets Groups Projects
Commit 97cc7621 authored by Maran Hidskes's avatar Maran Hidskes
Browse files

Expose GasLimit to ethPub

parent bdc20688
Branches
Tags
No related merge requests found
...@@ -46,6 +46,7 @@ type PBlock struct { ...@@ -46,6 +46,7 @@ type PBlock struct {
Transactions string `json:"transactions"` Transactions string `json:"transactions"`
Time int64 `json:"time"` Time int64 `json:"time"`
Coinbase string `json:"coinbase"` Coinbase string `json:"coinbase"`
GasLimit string `json:"gasLimit"`
} }
// Creates a new QML Block from a chain block // Creates a new QML Block from a chain block
...@@ -64,7 +65,7 @@ func NewPBlock(block *ethchain.Block) *PBlock { ...@@ -64,7 +65,7 @@ func NewPBlock(block *ethchain.Block) *PBlock {
return nil 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()), 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 { func (self *PBlock) ToString() string {
......
...@@ -18,8 +18,8 @@ var ( ...@@ -18,8 +18,8 @@ var (
Wei = big.NewInt(1) Wei = big.NewInt(1)
) )
// Currency to string
// //
// Currency to string
// Returns a string representing a human readable format // Returns a string representing a human readable format
func CurrencyToString(num *big.Int) string { func CurrencyToString(num *big.Int) string {
switch { switch {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment