peer/example_test: switch TrickleTimeout -> TrickleInterval

This commit is contained in:
Conner Fromknecht 2018-08-23 22:49:09 -07:00
parent 7b402cd63b
commit 475eafdc70
No known key found for this signature in database
GPG key ID: E7D737B67FA592C7

View file

@ -23,7 +23,7 @@ func mockRemotePeer() error {
UserAgentName: "peer", // User agent name to advertise. UserAgentName: "peer", // User agent name to advertise.
UserAgentVersion: "1.0.0", // User agent version to advertise. UserAgentVersion: "1.0.0", // User agent version to advertise.
ChainParams: &chaincfg.SimNetParams, ChainParams: &chaincfg.SimNetParams,
TrickleTimeout: time.Second * 10, TrickleInterval: time.Second * 10,
} }
// Accept connections on the simnet port. // Accept connections on the simnet port.
@ -70,7 +70,7 @@ func Example_newOutboundPeer() {
UserAgentVersion: "1.0.0", // User agent version to advertise. UserAgentVersion: "1.0.0", // User agent version to advertise.
ChainParams: &chaincfg.SimNetParams, ChainParams: &chaincfg.SimNetParams,
Services: 0, Services: 0,
TrickleTimeout: time.Second * 10, TrickleInterval: time.Second * 10,
Listeners: peer.MessageListeners{ Listeners: peer.MessageListeners{
OnVersion: func(p *peer.Peer, msg *wire.MsgVersion) { OnVersion: func(p *peer.Peer, msg *wire.MsgVersion) {
fmt.Println("outbound: received version") fmt.Println("outbound: received version")