Skip to content

Commit 351fb01

Browse files
committed
fix alt chain txs
1 parent a8a1452 commit 351fb01

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

storage/blockchain/src/ops/alt_block/chain.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ pub fn update_alt_chain_info(
5858
db.alt_chain_infos
5959
.put(tx_rw, &alt_block_height.chain_id, &info)?;
6060

61-
db.alt_chain_infos.put(tx_rw, &alt_block_height.chain_id, &info)?;
62-
6361
Ok(())
6462
}
6563

storage/blockchain/src/ops/alt_block/tx.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn add_alt_transaction_blob(
3535
},
3636
)?;
3737

38-
if db.tx_ids.get(tx_rw, &tx.tx_hash).is_ok()
38+
if db.tx_ids.get(tx_rw, &tx.tx_hash).as_ref().is_ok_and(Option::is_some)
3939
|| db.alt_transaction_blobs
4040
.get(tx_rw, &tx.tx_hash)
4141
.as_ref()
@@ -67,11 +67,11 @@ pub fn get_alt_transaction(
6767
) -> DbResult<VerifiedTransactionInformation> {
6868
let tx_info = db.alt_transaction_infos
6969
.get(tx_ro, tx_hash)?
70-
.ok_or(BlockchainError::NotFound)?;
70+
.ok_or(BlockchainError::NotFound).unwrap();
7171

72-
let tx = match db.alt_transaction_blobs.get(tx_ro, tx_hash)? {
72+
let tx = match db.alt_transaction_blobs.get(tx_ro, tx_hash).unwrap() {
7373
Some(mut tx_blob) => Transaction::read(&mut tx_blob).unwrap(),
74-
None => get_tx(db, tx_hash, tx_ro, tapes)?,
74+
None => get_tx(db, tx_hash, tx_ro, tapes).unwrap(),
7575
};
7676

7777
let tx_weight = tx_info.tx_weight;

0 commit comments

Comments
 (0)