mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-16 13:06:40 +00:00
Added coin base to pub block
This commit is contained in:
parent
8fcba0eb1e
commit
99797858a6
1 changed files with 2 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ type PBlock struct {
|
||||||
Hash string `json:"hash"`
|
Hash string `json:"hash"`
|
||||||
Transactions string `json:"transactions"`
|
Transactions string `json:"transactions"`
|
||||||
Time int64 `json:"time"`
|
Time int64 `json:"time"`
|
||||||
|
Coinbase string `json:"coinbase"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates a new QML Block from a chain block
|
// Creates a new QML Block from a chain block
|
||||||
|
|
@ -34,7 +35,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}
|
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)}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *PBlock) ToString() string {
|
func (self *PBlock) ToString() string {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue