Skip to content

Commit 35d0b7a

Browse files
committed
Clarify docs on ShutdownScript::new_witness_program somewhat
This is especially important for C or other language bindings clients as the `version` field may be exported as a `u8`.
1 parent 1e7d479 commit 35d0b7a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lightning/src/ln/script.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ impl ShutdownScript {
8686
Self(ShutdownScriptImpl::Bolt2(Script::new_v0_wsh(script_hash)))
8787
}
8888

89-
/// Generates a P2WSH script pubkey from the given segwit version and program.
89+
/// Generates a witness script pubkey from the given segwit version and program.
90+
///
91+
/// Note for version-zero witness scripts you must use [`ShutdownScript::new_p2wpkh`] or
92+
/// [`ShutdownScript::new_p2wsh`] instead.
9093
///
9194
/// # Errors
9295
///

0 commit comments

Comments
 (0)