Skip to content

Commit

Permalink
Revert Liquid reorg treatment
Browse files Browse the repository at this point in the history
  • Loading branch information
junderw committed Dec 20, 2024
1 parent 737d725 commit c4cc60d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 2 additions & 8 deletions src/elements/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::chain::{BNetwork, BlockHash, Network, Txid};
use crate::elements::peg::{get_pegin_data, get_pegout_data, PeginInfo, PegoutInfo};
use crate::elements::registry::{AssetMeta, AssetRegistry};
use crate::errors::*;
use crate::new_index::schema::{Operation, TxHistoryInfo, TxHistoryKey, TxHistoryRow};
use crate::new_index::schema::{TxHistoryInfo, TxHistoryKey, TxHistoryRow};
use crate::new_index::{db::DBFlush, ChainQuery, DBRow, Mempool, Query};
use crate::util::{bincode_util, full_hash, Bytes, FullHash, TransactionStatus, TxInput};

Expand Down Expand Up @@ -178,17 +178,11 @@ pub fn index_confirmed_tx_assets(
network: Network,
parent_network: BNetwork,
rows: &mut Vec<DBRow>,
op: &Operation,
) {
let (history, issuances) = index_tx_assets(tx, network, parent_network);

rows.extend(history.into_iter().map(|(asset_id, info)| {
let history_row = asset_history_row(&asset_id, confirmed_height, tx_position, info);
if let Operation::DeleteBlocksWithHistory(tx) = op {
tx.send(history_row.key.hash)
.expect("unbounded channel won't fail");
}
history_row.into_row()
asset_history_row(&asset_id, confirmed_height, tx_position, info).into_row()
}));

// the initial issuance is kept twice: once in the history index under I<asset><height><txid:vin>,
Expand Down
1 change: 0 additions & 1 deletion src/new_index/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,6 @@ fn index_transaction(
iconfig.network,
iconfig.parent_network,
rows,
op,
);
}

Expand Down

0 comments on commit c4cc60d

Please sign in to comment.