|
|
@@ -14,6 +14,7 @@ import (
|
|
|
// Block interface exposed to QML
|
|
|
type JSBlock struct {
|
|
|
ref *ethchain.Block
|
|
|
+ Size string `json:"size"`
|
|
|
Number int `json:"number"`
|
|
|
Hash string `json:"hash"`
|
|
|
Transactions string `json:"transactions"`
|
|
|
@@ -40,7 +41,7 @@ func NewJSBlock(block *ethchain.Block) *JSBlock {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
- return &JSBlock{ref: block, Number: int(block.Number.Uint64()), GasUsed: block.GasUsed.String(), GasLimit: block.GasLimit.String(), Hash: ethutil.Bytes2Hex(block.Hash()), Transactions: string(txJson), Time: block.Time, Coinbase: ethutil.Bytes2Hex(block.Coinbase)}
|
|
|
+ return &JSBlock{ref: block, Size: block.Size().String(), Number: int(block.Number.Uint64()), GasUsed: block.GasUsed.String(), GasLimit: block.GasLimit.String(), Hash: ethutil.Bytes2Hex(block.Hash()), Transactions: string(txJson), Time: block.Time, Coinbase: ethutil.Bytes2Hex(block.Coinbase)}
|
|
|
}
|
|
|
|
|
|
func (self *JSBlock) ToString() string {
|