Skip to content

Commit

Permalink
Don't write to OUTPOINT_TO_TXID table (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Aug 24, 2022
1 parent def1c0e commit 23ffde5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
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

0 comments on commit 23ffde5

Please sign in to comment.