]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/node.go
Merge branch 'develop'
[nncp.git] / src / node.go
index e93b8d9c6565ba74954b11a3b6d7efb8f72efc7b..999af3d9b3bc88e5624669e004809c62bba5b2be 100644 (file)
@@ -32,7 +32,7 @@ import (
 type NodeId [blake2b.Size256]byte
 
 func (id NodeId) String() string {
-       return ToBase32(id[:])
+       return Base32Codec.EncodeToString(id[:])
 }
 
 type Node struct {
@@ -51,7 +51,7 @@ type Node struct {
        Addrs          map[string]string
        RxRate         int
        TxRate         int
-       OnlineDeadline uint
+       OnlineDeadline time.Duration
        MaxOnlineTime  time.Duration
        Calls          []*Call
 
@@ -112,7 +112,7 @@ func (nodeOur *NodeOur) Their() *Node {
 }
 
 func NodeIdFromString(raw string) (*NodeId, error) {
-       decoded, err := FromBase32(raw)
+       decoded, err := Base32Codec.DecodeString(raw)
        if err != nil {
                return nil, err
        }