major refactor part 2: remove cold import, full sync, generalize node table
This commit is contained in:
@@ -18,6 +18,7 @@ package node
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -60,7 +61,7 @@ func MakeNode(rpcClient core.RPCClient) core.Node {
|
||||
id, name := pr.NodeInfo()
|
||||
return core.Node{
|
||||
GenesisBlock: pr.GenesisBlock(),
|
||||
NetworkID: pr.NetworkID(),
|
||||
NetworkID: fmt.Sprintf("%f", pr.NetworkID()),
|
||||
ID: id,
|
||||
ClientName: name,
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ var _ = Describe("Node Info", func() {
|
||||
It("returns the network id for any client", func() {
|
||||
client := fakes.NewMockRPCClient()
|
||||
n := node.MakeNode(client)
|
||||
Expect(n.NetworkID).To(Equal(float64(1234)))
|
||||
Expect(n.NetworkID).To(Equal("1234.000000"))
|
||||
})
|
||||
|
||||
It("returns geth ID and client name for geth node", func() {
|
||||
|
||||
Reference in New Issue
Block a user