Skip to content

Commit fdd484b

Browse files
committed
fix(wallet): Avoid trusting a tx with no inputs
1 parent 7f3b6e2 commit fdd484b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/wallet/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,6 +1256,9 @@ impl Wallet {
12561256
let Some(tx) = self.indexed_graph.graph().get_tx(txid) else {
12571257
return false;
12581258
};
1259+
if tx.input.is_empty() {
1260+
return false;
1261+
}
12591262
tx.input.iter().all(|txin| {
12601263
self.indexed_graph
12611264
.index

0 commit comments

Comments
 (0)