|
@ -15,6 +15,7 @@ import ( |
|
|
"time" |
|
|
"time" |
|
|
|
|
|
|
|
|
. "github.com/tendermint/go-common" |
|
|
. "github.com/tendermint/go-common" |
|
|
|
|
|
"github.com/tendermint/go-crypto" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
const ( |
|
|
const ( |
|
@ -109,7 +110,7 @@ func NewAddrBook(filePath string) *AddrBook { |
|
|
|
|
|
|
|
|
// When modifying this, don't forget to update loadFromFile()
|
|
|
// When modifying this, don't forget to update loadFromFile()
|
|
|
func (a *AddrBook) init() { |
|
|
func (a *AddrBook) init() { |
|
|
a.key = CRandHex(24) // 24/2 * 8 = 96 bits
|
|
|
|
|
|
|
|
|
a.key = crypto.CRandHex(24) // 24/2 * 8 = 96 bits
|
|
|
// New addr buckets
|
|
|
// New addr buckets
|
|
|
a.addrNew = make([]map[string]*knownAddress, newBucketCount) |
|
|
a.addrNew = make([]map[string]*knownAddress, newBucketCount) |
|
|
for i := range a.addrNew { |
|
|
for i := range a.addrNew { |
|
|