From b6a1f902238508c81d656d2b956957f5879a8b08 Mon Sep 17 00:00:00 2001
From: Miguel Montes <miguel.montes@unc.edu.ar>
Date: Tue, 27 Nov 2018 19:37:16 -0300
Subject: [PATCH] =?UTF-8?q?Correcci=C3=B3n=20de=20error=20de=20tipos=20en?=
 =?UTF-8?q?=20PeerCount?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 bfa_client/src/bfa/node.go | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bfa_client/src/bfa/node.go b/bfa_client/src/bfa/node.go
index 89c37d4..f04700c 100644
--- a/bfa_client/src/bfa/node.go
+++ b/bfa_client/src/bfa/node.go
@@ -11,6 +11,7 @@ import (
 	"github.com/ethereum/go-ethereum/rpc"
 	"math/big"
 	"sort"
+	"strconv"
 )
 
 type Node rpc.Client
@@ -80,9 +81,11 @@ func (node *Node) IsMining() (mining bool) {
 	return
 }
 
-func (node *Node) PeerCount() (peerCount int64) {
+func (node *Node) PeerCount() int64 {
+	var peerCount string
 	node.Call(&peerCount, "net_peerCount")
-	return
+	p, _ := strconv.ParseInt(peerCount, 0, 64)
+	return p
 }
 
 func (node *Node) BalanceAtBlock(account string, blockNumber int64) *big.Int {
-- 
GitLab