Change populate_test_db to not return empty input

This commit is contained in:
wszdexdrf 2022-08-25 22:59:59 +05:30
parent d6e1dd1040
commit 138acc3b7d
No known key found for this signature in database
GPG Key ID: 4FAE8EF51A1296E5

View File

@ -490,11 +490,10 @@ macro_rules! populate_test_db {
let mut db = $db; let mut db = $db;
let tx_meta = $tx_meta; let tx_meta = $tx_meta;
let current_height: Option<u32> = $current_height; let current_height: Option<u32> = $current_height;
let input = if $is_coinbase { let mut input = vec![$crate::bitcoin::TxIn::default()];
vec![$crate::bitcoin::TxIn::default()] if !$is_coinbase {
} else { input[0].previous_output.vout = 0;
vec![] }
};
let tx = $crate::bitcoin::Transaction { let tx = $crate::bitcoin::Transaction {
version: 1, version: 1,
lock_time: 0, lock_time: 0,