mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-27 05:57:28 +00:00
Changed var names around
This commit is contained in:
parent
aefcb83419
commit
2232974cda
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user