Skip to content

Commit f8a01a0

Browse files
committed
Adds TryInto<Transaction> docs with disclaimer
See lightningdevkit#1061 (comment)
1 parent 894b31a commit f8a01a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning-block-sync/src/convert.rs

+3
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ impl TryInto<(BlockHash, Option<u32>)> for JsonResponse {
156156
}
157157
}
158158

159+
159160
impl TryInto<Txid> for JsonResponse {
160161
type Error = std::io::Error;
161162
fn try_into(self) -> std::io::Result<Txid> {
@@ -181,6 +182,8 @@ impl TryInto<Txid> for JsonResponse {
181182
}
182183
}
183184

185+
/// Converts a JSON value into a transaction. WATCH OUT! this cannot be used form zero-input transactions
186+
/// (e.g. createrawtransaction). See https://github.com/rust-bitcoin/rust-bitcoincore-rpc/issues/197
184187
impl TryInto<Transaction> for JsonResponse {
185188
type Error = std::io::Error;
186189
fn try_into(self) -> std::io::Result<Transaction> {

0 commit comments

Comments
 (0)