Skip to content

Commit f263838

Browse files
Mateusz FaltynMateusz Faltyn
Mateusz Faltyn
authored and
Mateusz Faltyn
committed
Revised lightning lib.rs
1 parent c16c1cb commit f263838

File tree

1 file changed

+16
-27
lines changed

1 file changed

+16
-27
lines changed

lightning/src/lib.rs

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,27 @@
1818
//! generated/etc. This makes it a good candidate for tight integration into an existing wallet
1919
//! instead of having a rather-separate lightning appendage to a wallet.
2020
//!
21-
//! Some of the features include:
21+
//! Available features are:
2222
//!
23-
//! 1. Internal test utilities exposed to other repo crates:
24-
//! ```rust
25-
//! _test_utils = ["hex", "regex", "bitcoin/bitcoinconsensus"]
26-
//! ```
23+
//! 1. Skip logging of messages at levels below the given log level:
24+
//! * `max_level_off`
25+
//! * `max_level_error`
26+
//! * `max_level_warn `
27+
//! * `max_level_info`
28+
//! * `max_level_debug`
29+
//! * `max_level_trace`
2730
//!
28-
//! 2. Unlog messages superior at targeted level:
29-
//! ```rust
30-
//! max_level_off = []
31-
//! max_level_error = []
32-
//! max_level_warn = []
33-
//! max_level_info = []
34-
//! max_level_debug = []
35-
//! max_level_trace = []
36-
//! ```
31+
//! 2. Allow signing of local transactions that may have been revoked or will be revoked,
32+
//! for functional testing (e.g. justice tx handling):
33+
//! * `unsafe_revoked_tx_signing` - allows unsafe signing in dev code, such as functional testing of justice transactions outside our crate
34+
//! * `_bench_unstable` - allows test features for benching
35+
//! * `no-std ` - exposes write trait implementations from the `core2` crate
3736
//!
38-
//! 3. Allow signing of local transactions that may have been revoked or will be revoked, for functional testing (e.g. justice tx handling). This is unsafe to use in production because it may result in the counterparty publishing taking our funds.
39-
//! ```rust
40-
//! unsafe_revoked_tx_signing = []
41-
//! _bench_unstable = []
37+
//! `default` features are:
4238
//!
43-
//! no-std = ["hashbrown", "bitcoin/no-std", "core2/alloc"]
44-
//! std = ["bitcoin/std"]
45-
//! ```
39+
//! * `std` - enables things which require `std`, including `std::io` trait implementations and things which utilize time
40+
//! * `grind_signatures` - enables generation of [low-r bitcoin signatures](https://bitcoin.stackexchange.com/questions/111660/what-is-signature-grinding), which saves 1 byte per signature in 50% of the cases (see [bitcoin PR #13666](https://github.com/bitcoin/bitcoin/pull/13666))
4641
//!
47-
//! 4. Generate low-r bitcoin signatures, which saves 1 byte in 50% of the cases:
48-
//! ```rust
49-
//! grind_signatures = []
50-
//!
51-
//! default = ["std", "grind_signatures"]
52-
//! ```
5342
5443

5544
#![cfg_attr(not(any(test, fuzzing, feature = "_test_utils")), deny(missing_docs))]

0 commit comments

Comments
 (0)