Skip to content

Commit 86c1a75

Browse files
committed
Change populate_test_db to not return empty input
1 parent 26a9a19 commit 86c1a75

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/database/memory.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,10 @@ macro_rules! populate_test_db {
490490
let mut db = $db;
491491
let tx_meta = $tx_meta;
492492
let current_height: Option<u32> = $current_height;
493-
let input = if $is_coinbase {
494-
vec![$crate::bitcoin::TxIn::default()]
495-
} else {
496-
vec![]
497-
};
493+
let mut input = vec![$crate::bitcoin::TxIn::default()];
494+
if !$is_coinbase {
495+
input[0].previous_output.vout = 0;
496+
}
498497
let tx = $crate::bitcoin::Transaction {
499498
version: 1,
500499
lock_time: 0,

0 commit comments

Comments
 (0)