* adjusted default config to scale better

* test default config values for dev accidental changes
* bump runtime result
master
Kevin Froman 2020-03-26 03:46:49 -05:00
parent db9cd3eb60
commit d5c9b01b53
3 changed files with 51 additions and 11 deletions

View File

@ -3,13 +3,13 @@
"security_auditing": true
},
"allocations": {
"disk": 1073741824,
"net_total": 1000000000
"disk": 1073741824
},
"general": {
"announce_node": true,
"dev_mode": false,
"display_header": true,
"ephemeral_tunnels": false,
"hide_created_blocks": true,
"insert_deniable_blocks": true,
"max_block_age": 2678400,
@ -19,7 +19,6 @@
"random_bind_ip": true,
"security_level": 0,
"show_notifications": true,
"socket_servers": false,
"store_plaintext_blocks": true,
"use_bootstrap_list": true,
"use_subprocess_pow_if_possible": true
@ -40,7 +39,7 @@
},
"peers": {
"max_connect": 1000,
"max_stored_peers": 5000,
"max_stored_peers": 10000000,
"minimum_score": -100
},
"plugins": {
@ -60,8 +59,7 @@
"existing_control_port": 0,
"existing_socks_port": 0,
"use_bridge": false,
"use_existing_tor": false,
"v3onions": true
"use_existing_tor": false
},
"transports": {
"lan": true,

View File

@ -1 +1 @@
1585025509
1585212325

View File

@ -17,6 +17,48 @@ class OnionrConfig(unittest.TestCase):
import onionrsetup
onionrsetup.setup_config()
with open(TEST_DIR + 'config.json') as conf:
json.loads(conf.read())
conf = json.loads(conf.read())
self.assertEqual(conf['advanced']['security_auditing'], True)
self.assertEqual(conf['allocations']['disk'], 1073741824)
self.assertEqual(conf['allocations']['disk'], 1073741824)
self.assertEqual(conf['general']['announce_node'], True)
self.assertEqual(conf['general']['dev_mode'], False)
self.assertEqual(conf['general']['display_header'], True)
self.assertEqual(conf['general']['ephemeral_tunnels'], False)
self.assertEqual(conf['general']['hide_created_blocks'], True)
self.assertEqual(conf['general']['insert_deniable_blocks'], True)
self.assertEqual(conf['general']['max_block_age'], 2678400)
self.assertEqual(conf['general']['minimum_block_pow'], 5)
self.assertEqual(conf['general']['minimum_send_pow'], 5)
self.assertEqual(conf['general']['public_key'], '')
self.assertEqual(conf['general']['random_bind_ip'], True)
self.assertEqual(conf['general']['security_level'], 0)
self.assertEqual(conf['general']['show_notifications'], True)
self.assertEqual(conf['general']['store_plaintext_blocks'], True)
self.assertEqual(conf['general']['use_bootstrap_list'], True)
self.assertEqual(conf['general']['use_subprocess_pow_if_possible'], True)
self.assertEqual(conf['log']['console']['color'], True)
self.assertEqual(conf['log']['console']['output'], True)
self.assertEqual(conf['log']['file']['output'], True)
self.assertEqual(conf['log']['file']['remove_on_exit'], True)
self.assertEqual(conf['log']['verbosity'], 'default')
self.assertEqual(conf['onboarding']['done'], False)
self.assertEqual(conf['peers']['max_connect'], 1000)
self.assertEqual(conf['peers']['max_stored_peers'], 10000000)
self.assertEqual(conf['peers']['minimum_score'], -100)
self.assertEqual(conf['plugins']['disabled'], ['chat'])
self.assertEqual(conf['plugins']['enabled'], [])
self.assertEqual(conf['timers']['getBlocks'], 10)
self.assertEqual(conf['timers']['lookupBlocks'], 25)
self.assertEqual(conf['tor']['bridge_fingerprint'], '')
self.assertEqual(conf['tor']['bridge_ip'], '')
self.assertEqual(conf['tor']['existing_control_password'], '')
self.assertEqual(conf['tor']['existing_control_port'], 0)
self.assertEqual(conf['tor']['existing_socks_port'], 0)
self.assertEqual(conf['tor']['use_bridge'], False)
self.assertEqual(conf['tor']['use_existing_tor'], False)
self.assertEqual(conf['transports']['lan'], True)
self.assertEqual(conf['transports']['manual_disk'], True)
self.assertEqual(conf['transports']['tor'], True)
self.assertEqual(conf['ui']['theme'], 'dark')
unittest.main()