swarm: Added lightnode flag (#17291)

* swarm: Added lightnode flag

Added --lightnode command line parameter
Added LightNode to Handshake message

* swarm/config: Fixed variable naming

* cmd/swarm: Changed BoolTFlag to BoolFlag for SwarmLightNodeEnabled

* swarm/network: Changed logging

* swarm/network: Changed protocol version testing

* swarm/network: Renamed DefaultNetworkID variable to TestProtocolNetworkID

* swarm/network: Bumped protocol version

* swarm/network: Changed LightNode handhsake test to table driven

* swarm/network: Changed back TestProtocolVersion to 5 for now

* swarm/network: Moved the test configuration inside the test function scope
This commit is contained in:
Attila Gazso
2018-08-07 15:34:11 +02:00
committed by Balint Gabor
parent 8461fea44b
commit 9df16f3468
6 changed files with 95 additions and 17 deletions

View File

@ -143,6 +143,7 @@ func NewSwarm(config *api.Config, mockStore *mock.NodeStore) (self *Swarm, err e
OverlayAddr: addr.OAddr,
UnderlayAddr: addr.UAddr,
HiveParams: config.HiveParams,
LightNode: config.LightNodeEnabled,
}
stateStore, err := state.NewDBStore(filepath.Join(config.Path, "state-store.db"))