aboutsummaryrefslogtreecommitdiffstats
path: root/ethpub
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-05-26 23:18:51 +0800
committerMaran <maran.hidskes@gmail.com>2014-05-26 23:18:51 +0800
commit2232974cda9ed73c62a370545742ef88332c5f1e (patch)
tree7f92fe901054e4620b6bb32c96ed492e71eb6ac5 /ethpub
parentaefcb834199a64ff62daf7e685bbe5088c08a11e (diff)
downloaddexon-2232974cda9ed73c62a370545742ef88332c5f1e.tar
dexon-2232974cda9ed73c62a370545742ef88332c5f1e.tar.gz
dexon-2232974cda9ed73c62a370545742ef88332c5f1e.tar.bz2
dexon-2232974cda9ed73c62a370545742ef88332c5f1e.tar.lz
dexon-2232974cda9ed73c62a370545742ef88332c5f1e.tar.xz
dexon-2232974cda9ed73c62a370545742ef88332c5f1e.tar.zst
dexon-2232974cda9ed73c62a370545742ef88332c5f1e.zip
Changed var names around
Diffstat (limited to 'ethpub')
-rw-r--r--ethpub/types.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/ethpub/types.go b/ethpub/types.go
index edef7d50e..af3cfe2cd 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 {