config: fix addrbook path to go in config

This commit is contained in:
Ethan Buchman
2018-01-23 22:21:17 -05:00
parent 775bb85efb
commit 85816877c6
4 changed files with 16 additions and 14 deletions

View File

@@ -10,8 +10,8 @@ import (
/* Loading & Saving */
type addrBookJSON struct {
Key string
Addrs []*knownAddress
Key string `json:"key"`
Addrs []*knownAddress `json:"addrs"`
}
func (a *addrBook) saveToFile(filePath string) {

View File

@@ -9,13 +9,13 @@ import (
// knownAddress tracks information about a known network address
// that is used to determine how viable an address is.
type knownAddress struct {
Addr *p2p.NetAddress
Src *p2p.NetAddress
Attempts int32
LastAttempt time.Time
LastSuccess time.Time
BucketType byte
Buckets []int
Addr *p2p.NetAddress `json:"addr"`
Src *p2p.NetAddress `json:"src"`
Attempts int32 `json:"attempts"`
LastAttempt time.Time `json:"last_attempt"`
LastSuccess time.Time `json:"last_success"`
BucketType byte `json:"bucket_type"`
Buckets []int `json:"buckets"`
}
func newKnownAddress(addr *p2p.NetAddress, src *p2p.NetAddress) *knownAddress {