Forgotten testnet1 cherries (#475)

* Very quick peer banning endpoint, helps with #406
* Ping heights (#407)
* add height to ping/ping
* reformat output
* fix p2p test
* Fix orphan handling, not related to current head. Fixes #412
* Check before borrow, fixes #267
* Not finding an output commit in pos is an AlreadySpent
* Fix race condition, sending before conn is ready
* Explicit error for unknown pos of a forked block
* Remove config outdated tests. Fix #333
* Check ref and try before borrow, fix #400
* We do not want to sync with old peers anyway
* Hide cargo compiler warning for unused NoopAdapter and unused test code. Add TODOs
This commit is contained in:
Simon B
2017-12-13 22:52:21 +01:00
committed by Ignotus Peverell
parent bffd955c26
commit 17d5898677
15 changed files with 126 additions and 73 deletions
-34
View File
@@ -186,37 +186,3 @@ impl GlobalConfig {
.enable_mining;
}
}
#[test]
fn test_read_config() {
let toml_str = r#"
#Section is optional, if not here or enable_server is false, will only run wallet
[server]
enable_server = true
api_http_addr = "127.0.0.1"
db_root = "."
seeding_type = "None"
test_mode = false
#7 = FULL_NODE, not sure how to serialise this properly to use constants
capabilities = [7]
[server.p2p_config]
host = "127.0.0.1"
port = 13414
#Mining section is optional, if it's not here it will default to not mining
[mining]
enable_mining = true
wallet_listener_url = "http://127.0.0.1:13415"
burn_reward = false
#testing value, optional
#slow_down_in_millis = 30
"#;
let mut decoded: GlobalConfig = toml::from_str(toml_str).unwrap();
decoded.server.as_mut().unwrap().mining_config = decoded.mining;
println!("Decoded.server: {:?}", decoded.server);
println!("Decoded wallet: {:?}", decoded.wallet);
panic!("panic");
}