added ulc config params (#1255)
* added ulc config params * fmt * fix lint
This commit is contained in:
parent
29b55bd445
commit
bdbceba6eb
|
@ -218,6 +218,10 @@ func activateLightEthService(stack *node.Node, config *params.NodeConfig) error
|
|||
ethConf.SyncMode = downloader.LightSync
|
||||
ethConf.NetworkId = config.NetworkID
|
||||
ethConf.DatabaseCache = config.LightEthConfig.DatabaseCache
|
||||
ethConf.ULC = ð.ULCConfig{
|
||||
TrustedServers: config.LightEthConfig.TrustedNodes,
|
||||
MinTrustedFraction: config.LightEthConfig.MinTrustedFraction,
|
||||
}
|
||||
return stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
|
||||
return les.New(ctx, ðConf)
|
||||
})
|
||||
|
|
|
@ -31,6 +31,12 @@ type LightEthConfig struct {
|
|||
|
||||
// DatabaseCache is memory (in MBs) allocated to internal caching (min 16MB / database forced)
|
||||
DatabaseCache int
|
||||
|
||||
// TrustedNodes is a list of trusted servers
|
||||
TrustedNodes []string
|
||||
|
||||
//MinTrustedFraction is minimum percentage of connected trusted servers to validate header(1-100)
|
||||
MinTrustedFraction int
|
||||
}
|
||||
|
||||
// ----------
|
||||
|
|
Loading…
Reference in New Issue