Commit 2232974c authored by Maran's avatar Maran

Changed var names around

parent aefcb834
...@@ -23,17 +23,18 @@ func NewPBlock(block *ethchain.Block) *PBlock { ...@@ -23,17 +23,18 @@ func NewPBlock(block *ethchain.Block) *PBlock {
if block == nil { if block == nil {
return nil return nil
} }
var ptxs []PTx var ptxs []PTx
for _, tx := range block.Transactions() { for _, tx := range block.Transactions() {
ptxs = append(ptxs, *NewPTx(tx)) ptxs = append(ptxs, *NewPTx(tx))
} }
b, err := json.Marshal(ptxs) txJson, err := json.Marshal(ptxs)
if err != nil { if err != nil {
return nil return nil
} }
return &PBlock{ref: block, Number: int(block.Number.Uint64()), Hash: ethutil.Hex(block.Hash()), Transactions: string(b), Time: block.Time} return &PBlock{ref: block, Number: int(block.Number.Uint64()), Hash: ethutil.Hex(block.Hash()), Transactions: string(txJson), Time: block.Time}
} }
func (self *PBlock) ToString() string { func (self *PBlock) ToString() string {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment