github.com/status-im/status-go@v1.1.0/waku/config.go (about) 1 // Copyright 2019 The Waku Library Authors. 2 // 3 // The Waku library is free software: you can redistribute it and/or modify 4 // it under the terms of the GNU Lesser General Public License as published by 5 // the Free Software Foundation, either version 3 of the License, or 6 // (at your option) any later version. 7 // 8 // The Waku library is distributed in the hope that it will be useful, 9 // but WITHOUT ANY WARRANTY; without even the implied warranty off 10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 // GNU Lesser General Public License for more details. 12 // 13 // You should have received a copy of the GNU Lesser General Public License 14 // along with the Waku library. If not, see <http://www.gnu.org/licenses/>. 15 // 16 // This software uses the go-ethereum library, which is licensed 17 // under the GNU Lesser General Public Library, version 3 or any later. 18 19 package waku 20 21 import ( 22 "github.com/status-im/status-go/waku/common" 23 ) 24 25 // Config represents the configuration state of a waku node. 26 type Config struct { 27 MaxMessageSize uint32 `toml:",omitempty"` 28 MinimumAcceptedPoW float64 `toml:",omitempty"` 29 BloomFilterMode bool `toml:",omitempty"` // when true, we only match against bloom filter 30 LightClient bool `toml:",omitempty"` // when true, it does not forward messages 31 FullNode bool `toml:",omitempty"` // when true, it forwards all messages 32 RestrictLightClientsConn bool `toml:",omitempty"` // when true, do not accept light client as peers if it is a light client itself 33 EnableConfirmations bool `toml:",omitempty"` // when true, sends message confirmations 34 SoftBlacklistedPeerIDs []string `toml:",omitempty"` 35 } 36 37 var DefaultConfig = Config{ 38 MaxMessageSize: common.DefaultMaxMessageSize, 39 MinimumAcceptedPoW: common.DefaultMinimumPoW, 40 RestrictLightClientsConn: true, 41 }