From 2232974cda9ed73c62a370545742ef88332c5f1e Mon Sep 17 00:00:00 2001 From: Maran Date: Mon, 26 May 2014 17:18:51 +0200 Subject: [PATCH] Changed var names around --- ethpub/types.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ethpub/types.go b/ethpub/types.go index edef7d50ec..af3cfe2cd8 100644 --- a/ethpub/types.go +++ b/ethpub/types.go @@ -23,17 +23,18 @@ func NewPBlock(block *ethchain.Block) *PBlock { if block == nil { return nil } + var ptxs []PTx for _, tx := range block.Transactions() { ptxs = append(ptxs, *NewPTx(tx)) } - b, err := json.Marshal(ptxs) + txJson, err := json.Marshal(ptxs) if err != 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 {