Added couple of debug helpers to deal with panics and segfaults (#302)

* added couple of debug helpers to deal with panics

* trying to fix compilation

* trying to fix compilation

* test

* Revert "test"

This reverts commit 6169f7e1eb5cc7b43ea2e538686cb0144bf64712.
This commit is contained in:
Svyatoslav Nikolsky 2017-04-05 17:19:10 +03:00 committed by Marek Kotewicz
parent 3047d99e78
commit 4cb65e3409
2 changed files with 17 additions and 0 deletions

View File

@ -26,6 +26,20 @@ logs = { path = "logs" }
rpc = { path = "rpc" }
primitives = { path = "primitives" }
[profile.dev]
debug = true
panic = 'abort'
[profile.release]
debug = true
panic = 'abort'
[profile.test]
debug = true
[profile.doc]
debug = true
[[bin]]
path = "pbtc/main.rs"
name = "pbtc"

View File

@ -38,6 +38,9 @@ pub const REGTEST_USER_AGENT: &'static str = "/Satoshi:0.12.1/";
pub const LOG_INFO: &'static str = "sync=info";
fn main() {
// Always print backtrace on panic.
::std::env::set_var("RUST_BACKTRACE", "1");
if let Err(err) = run() {
println!("{}", err);
}