From 1fecbec3df35b5a667bfc3d5dfa83a58500eb3cb Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Thu, 8 Aug 2013 09:26:18 -0500 Subject: [PATCH] Move userAgent to peer where it's used. --- btcd.go | 2 -- peer.go | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/btcd.go b/btcd.go index db698850..5187fa90 100644 --- a/btcd.go +++ b/btcd.go @@ -19,8 +19,6 @@ import ( "time" ) -var userAgent = fmt.Sprintf("/btcd:%d.%d.%d/", appMajor, appMinor, appPatch) - // used by the dns seed code to pick a random last seen time const ( secondsIn3Days int32 = 24 * 60 * 60 * 3 diff --git a/peer.go b/peer.go index 7b3e5a68..2580c979 100644 --- a/peer.go +++ b/peer.go @@ -20,6 +20,10 @@ import ( const outputBufferSize = 50 +// userAgent is the user agent string used to identify ourselves to other +// bitcoin peers. +var userAgent = fmt.Sprintf("/btcd:%d.%d.%d/", appMajor, appMinor, appPatch) + // zeroHash is the zero value hash (all zeros). It is defined as a convenience. var zeroHash btcwire.ShaHash