]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cypherpunks.ru/nncp/node.go
Merge branch 'develop'
[nncp.git] / src / cypherpunks.ru / nncp / node.go
index f1fb79ff5bdf8df4b7bca8f44bdc1eb08e3b4802..e903567bcdbff6befad0842cf61252938ff13b9d 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2018 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2019 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -24,7 +24,6 @@ import (
        "sync"
 
        "github.com/flynn/noise"
-       "github.com/gorhill/cronexpr"
        "golang.org/x/crypto/blake2b"
        "golang.org/x/crypto/ed25519"
        "golang.org/x/crypto/nacl/box"
@@ -49,6 +48,8 @@ type Node struct {
        FreqMinSize    int64
        Via            []*NodeId
        Addrs          map[string]string
+       RxRate         int
+       TxRate         int
        OnlineDeadline uint
        MaxOnlineTime  uint
        Calls          []*Call
@@ -67,15 +68,6 @@ type NodeOur struct {
        NoisePrv *[32]byte
 }
 
-type Call struct {
-       Cron           *cronexpr.Expression
-       Nice           uint8
-       Xx             TRxTx
-       Addr           *string
-       OnlineDeadline uint
-       MaxOnlineTime  uint
-}
-
 func NewNodeGenerate() (*NodeOur, error) {
        exchPub, exchPrv, err := box.GenerateKey(rand.Reader)
        if err != nil {