Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't write to OUTPOINT_TO_TXID table #373

Merged
merged 3 commits into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl Index {
txid: Txid,
tx: &Transaction,
outpoint_to_ordinal_ranges: &mut Table<[u8], [u8]>,
outpoint_to_txid: &mut Table<[u8], [u8]>,
#[allow(unused)] outpoint_to_txid: &mut Table<[u8], [u8]>,
input_ordinal_ranges: &mut VecDeque<(u64, u64)>,
ordinal_ranges_written: &mut u64,
) -> Result {
Expand Down Expand Up @@ -318,6 +318,7 @@ impl Index {
outpoint_to_ordinal_ranges.insert(&serialize(&outpoint), &ordinals)?;
}

#[cfg(any())]
for input in &tx.input {
outpoint_to_txid.insert(&serialize(&input.previous_output), &txid)?;
}
Expand Down
1 change: 1 addition & 0 deletions tests/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ fn null_input() {
}

#[test]
#[ignore]
fn old_transactions_are_pruned() {
Test::new()
.command("list 150ba822b458a19615e70a604d8dd9d3482fc165fa4e9cc150d74e11916ce8ae:0")
Expand Down
1 change: 1 addition & 0 deletions tests/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ fn unknown_output_returns_404() {
}

#[test]
#[ignore]
fn spent_output_returns_200() {
let mut state = State::new();

Expand Down