mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-17 02:47:51 +01:00
Refactor message encoding into protocol package. User Agent must be now provided in the Init function.
This commit is contained in:
@@ -6,8 +6,15 @@ Author: Peter Kleissner
|
||||
|
||||
package core
|
||||
|
||||
var userAgent = "Peernet Core/0.1" // must be overwritten by the caller
|
||||
|
||||
// Init initializes the client. The config must be loaded first!
|
||||
func Init() {
|
||||
// The User Agent must be provided in the form "Application Name/1.0".
|
||||
func Init(UserAgent string) {
|
||||
if userAgent = UserAgent; userAgent == "" {
|
||||
return
|
||||
}
|
||||
|
||||
initFilters()
|
||||
initPeerID()
|
||||
initUserBlockchain()
|
||||
|
||||
Reference in New Issue
Block a user