github.com/lbryio/lbcd@v0.22.119/addrmgr/internal_test.go (about)

     1  // Copyright (c) 2013-2015 The btcsuite developers
     2  // Use of this source code is governed by an ISC
     3  // license that can be found in the LICENSE file.
     4  
     5  package addrmgr
     6  
     7  import (
     8  	"time"
     9  
    10  	"github.com/lbryio/lbcd/wire"
    11  )
    12  
    13  func TstKnownAddressIsBad(ka *KnownAddress) bool {
    14  	return ka.isBad()
    15  }
    16  
    17  func TstKnownAddressChance(ka *KnownAddress) float64 {
    18  	return ka.chance()
    19  }
    20  
    21  func TstNewKnownAddress(na *wire.NetAddress, attempts int,
    22  	lastattempt, lastsuccess time.Time, tried bool, refs int) *KnownAddress {
    23  	return &KnownAddress{na: na, attempts: attempts, lastattempt: lastattempt,
    24  		lastsuccess: lastsuccess, tried: tried, refs: refs}
    25  }