Skip to content

Commit

Permalink
Fixup a few panic messages
Browse files Browse the repository at this point in the history
  • Loading branch information
romanz committed Aug 4, 2023
1 parent 2513f6f commit 50e0d3a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,10 @@ fn filter_block_txs_outputs(
fn visit_transaction(&mut self, tx: &bsl::Transaction) -> core::ops::ControlFlow<()> {
if !self.buffer.is_empty() {
let result = std::mem::take(&mut self.buffer);
let txid = bitcoin::Txid::from_slice(tx.txid_sha2().as_slice()).expect("32");
let txid =
bitcoin::Txid::from_slice(tx.txid_sha2().as_slice()).expect("invalid txid");
let tx = bitcoin::Transaction::consensus_decode(&mut tx.as_ref())
.expect("already validated");
.expect("transaction was already validated");
self.result.push(FilteredTx::<TxOutput> {
tx,
txid,
Expand Down Expand Up @@ -583,9 +584,10 @@ fn filter_block_txs_inputs(
fn visit_transaction(&mut self, tx: &bsl::Transaction) -> ControlFlow<()> {
if !self.buffer.is_empty() {
let result = std::mem::take(&mut self.buffer);
let txid = bitcoin::Txid::from_slice(tx.txid_sha2().as_slice()).expect("32");
let txid =
bitcoin::Txid::from_slice(tx.txid_sha2().as_slice()).expect("invalid txid");
let tx = bitcoin::Transaction::consensus_decode(&mut tx.as_ref())
.expect("already validated");
.expect("transaction was already validated");
self.result.push(FilteredTx::<OutPoint> {
tx,
txid,
Expand Down

0 comments on commit 50e0d3a

Please sign in to comment.