* [NOD-1198] Make router a property of netConnection, and remove map from connection to router in netAdapter
* [NOD-1198] Moved all router logic from netAdapter to netConnection
* [NOD-1198] Move disconnect to NetConnection
* [NOD-1198] Unexport netConnection.start
* [NOD-1198] Remove error from Disconnect functions
* [NOD-1198] Make sure OnDisconnectedHandler doesn't run when it shouldn't
* [NOD-1162] [FIX] Connection manager should run the moment it adds a request
* [NOD-1162] [FIX] Set peerID on handshake
* [NOD-1162] [FIX] Broadcast should send to outgoing route, not incoming
* [NOD-1162] [FIX] Add CmdInvRelayBlock to MakeEmptyMessage
* [NOD-1162] [FIX] Initialize Hash before decoding MsgInvRelayBlock
* [NOD-1162] [FIX] Invert condition
* [NOD-1162] [FIX] Fixes to encoding of MsgGetRelayBlocks
* [NOD-1162] [FIX] Add MsgGetRelayBlocks to MakeEmptyMessage
* [NOD-1162] Add comment
* [NOD-1123] Bubble bad-message errors up to the protocol level.
* [NOD-1123] Implement Banning.
* [NOD-1123] Properly use &stopped.
* [NOD-1123] Ban by IP rather than IP and port.
* [NOD-1123] Don't initiate connections to banned peers.
* [NOD-1123] Fix infinite loop in checkOutgoingConnections.
* [NOD-1123] Fix bannedAddresses key.
* [NOD-1123] Rename onBadMessageHandler to onInvalidMessageHandler.
* [NOD-1170] Return a custom error when a route is closed
* [NOD-1170] Return ErrRouteClosed directly from route methods
* [NOD-1170] Fix comment location
* [NOD-1120] Removed closure in NetAdapter.onConnectedHanlder
* [NOD-1120] Implement all connection manager methods
* [NOD-1120] Integrated connmanager into kaspad + added call for dnsseeder
* [NOD-1120] Allow buffer to not be bytes.Buffer
* [NOD-1120] Added timeout to connect
* [NOD-1120] Don't enter connections to add loop if none needed
* [NOD-1120] Add call for addressManager.Good
* [NOD-1120] Minor bug fixes
* [NOD-1120] Remove errChan from grpcConnection
* [NOD-1120] Add comments to exported methods
* [NOD-1120] cancel the context for DialContext in gRPCServer.Connect
* [NOD-1120] Don't try to remove from connSet a connection that doesn't exist
* [NOD-1120] add ok bool to connectionSet.get
* [NOD-1120] Remove overuse of if-else in checkConnectionRequests
* [NOD-1120] Made some order in ConnectionManager
* [NOD-1120] Moved checkIncomingConnections to it's own file
* [NOD-1120] cleanup in checkOutgoingConnections
* [NOD-1120] Cleanup in SeedDNS, and move call outside of connection manager
* [NOD-1120] Add check that both --connect and --addpeer aren't used
* [NOD-1120] Move dial timeout to constant
* [NOD-1120] Enhance comment
* [NOD-1120] Log connection failure out of initiateConnection
* [NOD-1148] Reshuffle checkRequestedConnections to make more sense
* [NOD-1120] Move continue to correct place + reshuffle logging code
* [NOD-1120] Don't expose server.Connection outside netAdapter - expose a wrapper instead
* [NOD-1120] Add comments
* [NOD-1120] Don't return the connection from netAdapter.Connect()
* [NOD-1120] Use .Address as key for connectionSet
* [NOD-1120] Fix minRetryDuration usage
* [NOD-1120] Remove the correct number of incoming connections
* [NOD-1120] Add comment
* [NOD-1120] Rename connSet -> incomingConnectionSet
* [NOD-1120] fix grammar
* [NOD-1124] Move Router to the router package.
* [NOD-1124] Implement SetOnRouteCapacityReachedHandler.
* [NOD-1124] Use Routes instead of bare channels.
* [NOD-1124] Fix merge errors.
* [NOD-1124] Connect the Router to the Connection.
* [NOD-1124] Fix merge errors.
* [NOD-1124] Move some variables around.
* [NOD-1124] Fix unreachable code.
* [NOD-1124] Fix a variable name.
* [NOD-1124] Rename AddRoute to AddIncomingRoute.
* [NOD-1124] Rename SetRouter to Start.
* [NOD-1124] Make AddIncomingRoute create a Route by itself.
* [NOD-1124] Replace IncomingRoute with EnqueueIncomingMessage.
* [NOD-1124] Make Enqueue and Dequeue return isOpen instead of err.
* [NOD-1124] Remove writeDuringDisconnectLock.
* [NOD-1124] In sendLoop, move outgoingRoute to outside the loop.
* [NOD-1124] Start the connection loops only when Start is called.
* [NOD-1124] Replace OnIDReceivedHandler with AssociateRouterID.
* [NOD-1124] Add isOpen to Enqueue and Dequeue.
* [NOD-1124] Protect errChan from writing during disconnect.
* [NOD-1118] Added protobufs for the MessageStream
* [NOD-1118] Implement some of the basic grpc methods
* [NOD-1118] Implemented gRPCConnection send and receive
* [NOD-1118] Implemented basic connection loops
* [NOD-1118] gRPC server implementation ready
* [NOD-1118] Add connection management
* [NOD-1118] Sort out the connection loops
* [NOD-1118] Add temporary testConnection
* [NOD-1118] Send to c.errChan whether error was recieved or not
* [NOD-1118] Call OnConnectHandler in time
* [NOD-1118] Handle closing connections properly
* [NOD-1118] Add comments to exported functions
* [NOD-1118] Call server.addConnection on newConnection
* [NOD-1118] Add a TODO comment
* [NOD-1118] Add a TODO comment
* [NOD-1118] Make connection a Stringer
* [NOD-1118] Made the connection loops 100% synchronic
* [NOD-1118] Make connection.isConnected uint32
* [NOD-1118] Move the Add/Remove connection from grpcConnection to register/unregister connection
* [NOD-1118] Convert error messages to lower case
* [NOD-1118] Remove protoc inline dependency
* [NOD-1118] Fix comment
* [NOD-1118] Exit if there was an error starting the protocol manager
* [NOD-1118] Fix error message
* [NOD-1118] Fixed a few comments
* [NOD-1118] Extract listenOn to a method
* [NOD-1118] Use !=0 for isConnected
* [NOD-1118] Refactor listenOn
* [NOD-1118] Add lock on channelWrites in gRPCConnection
* [NOD-1118] Rename channelWriteLock -> writeDuringDisconnectLock
* [NOD-1118] Reshuffle a comment
* [NOD-1118] Add a TODO comment
* [NOD-1124] Rename Peer to Connection (because Peer is a business logic term)
* [NOD-1124] Implement Close for Router.
* [NOD-1124] Add SetPeerDisconnectedHandler.
* [NOD-1124] Remove mentions of "peer" from the netadapter package.
* [NOD-1124] Handle errors/stopping in netadapter.
* [NOD-1124] Remove netadapter.Connection.
* [NOD-1124] Add startSendLoop.
* [NOD-1124] Implement network IDs.
* [NOD-1124] Implement a map between IDs and routes.
* [NOD-1124] Implement Broadcast.
* [NOD-1124] Fix rename error.
* [NOD-1124] Fix copy+paste error.
* [NOD-1124] Change the type of NetAdapter.stop to uint32.
* [NOD-1124] If NetAdapter is stopped more than once, return an error.
* [NOD-1124] Add an error case to RouteInputMessage.
* [NOD-1124] Rename CreateID to NewID.
* [NOD-1124] Spawn from outside startReceiveLoop and startSendLoop.
* [NOD-1124] Fix a comment.
* [NOD-1124] Replace break with for condition.
* [NOD-1124] Don't disconnect from disconnected peers.
* [NOD-1124] Fix a for condition.
* [NOD-1124] Handle an error.
* [NOD-1124] Begin implementing netadapter.
* [NOD-1124] Implementing a stub gRPC server..
* [NOD-1124] Construct the server inside the netadapter.
* [NOD-1124] Rewrite protocol.go to fit with the new netAdapter model.
* [NOD-1124] Wrap a connection in Peer.
* [NOD-1124] Add a peerstate object.
* [NOD-1124] Remove the peerstate object.
* [NOD-1124] Remove router out of Peer.
* [NOD-1124] Tag a TODO.
* [NOD-1124] Return an error out of AddRoute if a route already exists for some message type.
* [NOD-1124] Rename the package grpc to grpcserver.
* [NOD-1124] Extracted newConnectionHandler into a type.
* [NOD-1124] Extract routerInitializer into a type.
* [NOD-1124] Panic/Add TODOs everywhere that isn't implemented.
* [NOD-1124] Improve the NetAdapter comment.
* [NOD-1124] Rename NewConnectionHandler to PeerConnectedHandler.
* [NOD-1124] Rename buildRouterInitializer to newRouterInitializer.
* [NOD-1124] Remove unreachable code.
* [NOD-1124] Make go vet happy.