peer/peer_test: switch TrickleTimeout -> TrickleInterval

This commit is contained in:
Conner Fromknecht 2018-08-23 22:48:55 -07:00
parent 602bced5f5
commit 7b402cd63b
No known key found for this signature in database
GPG key ID: E7D737B67FA592C7

View file

@ -236,7 +236,7 @@ func TestPeerConnection(t *testing.T) {
ChainParams: &chaincfg.MainNetParams, ChainParams: &chaincfg.MainNetParams,
ProtocolVersion: wire.RejectVersion, // Configure with older version ProtocolVersion: wire.RejectVersion, // Configure with older version
Services: 0, Services: 0,
TrickleTimeout: time.Second * 10, TrickleInterval: time.Second * 10,
} }
peer2Cfg := &peer.Config{ peer2Cfg := &peer.Config{
Listeners: peer1Cfg.Listeners, Listeners: peer1Cfg.Listeners,
@ -245,7 +245,7 @@ func TestPeerConnection(t *testing.T) {
UserAgentComments: []string{"comment"}, UserAgentComments: []string{"comment"},
ChainParams: &chaincfg.MainNetParams, ChainParams: &chaincfg.MainNetParams,
Services: wire.SFNodeNetwork | wire.SFNodeWitness, Services: wire.SFNodeNetwork | wire.SFNodeWitness,
TrickleTimeout: time.Second * 10, TrickleInterval: time.Second * 10,
} }
wantStats1 := peerStats{ wantStats1 := peerStats{
@ -449,7 +449,7 @@ func TestPeerListeners(t *testing.T) {
UserAgentComments: []string{"comment"}, UserAgentComments: []string{"comment"},
ChainParams: &chaincfg.MainNetParams, ChainParams: &chaincfg.MainNetParams,
Services: wire.SFNodeBloom, Services: wire.SFNodeBloom,
TrickleTimeout: time.Second * 10, TrickleInterval: time.Second * 10,
} }
inConn, outConn := pipe( inConn, outConn := pipe(
&conn{raddr: "10.0.0.1:8333"}, &conn{raddr: "10.0.0.1:8333"},
@ -620,7 +620,7 @@ func TestOutboundPeer(t *testing.T) {
UserAgentComments: []string{"comment"}, UserAgentComments: []string{"comment"},
ChainParams: &chaincfg.MainNetParams, ChainParams: &chaincfg.MainNetParams,
Services: 0, Services: 0,
TrickleTimeout: time.Second * 10, TrickleInterval: time.Second * 10,
} }
r, w := io.Pipe() r, w := io.Pipe()
@ -761,7 +761,7 @@ func TestUnsupportedVersionPeer(t *testing.T) {
UserAgentComments: []string{"comment"}, UserAgentComments: []string{"comment"},
ChainParams: &chaincfg.MainNetParams, ChainParams: &chaincfg.MainNetParams,
Services: 0, Services: 0,
TrickleTimeout: time.Second * 10, TrickleInterval: time.Second * 10,
} }
localNA := wire.NewNetAddressIPPort( localNA := wire.NewNetAddressIPPort(