mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-19 09:50:08 +01:00
26 lines
641 B
Go
26 lines
641 B
Go
// Copyright (c) 2013-2015 The btcsuite developers
|
|
// Use of this source code is governed by an ISC
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package addrmgr
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/btcsuite/btcd/wire"
|
|
)
|
|
|
|
func TstKnownAddressIsBad(ka *KnownAddress) bool {
|
|
return ka.isBad()
|
|
}
|
|
|
|
func TstKnownAddressChance(ka *KnownAddress) float64 {
|
|
return ka.chance()
|
|
}
|
|
|
|
func TstNewKnownAddress(na *wire.NetAddressV2, attempts int,
|
|
lastattempt, lastsuccess time.Time, tried bool, refs int) *KnownAddress {
|
|
return &KnownAddress{na: na, attempts: attempts, lastattempt: lastattempt,
|
|
lastsuccess: lastsuccess, tried: tried, refs: refs}
|
|
}
|