Skip to content

Use of Error::Internal in chanmgr get_or_launch allocates too much

In tor-chanmgr/src/mgr.rs, line 132, we do this:

    let mut last_err = Err(Error::Internal(internal!("Error was never set!?")));

Whoops, that's no good! This means that every time we open a channel, we store a pretty complete backtrace. We should either use tor_retry as the message suggests, or have this be an Option<Error>.

Found by heap-profiling our bootstrapping process.

Part of #87.