mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 18:10:51 +01:00
Refactor txid collision test a bit
This commit is contained in:
parent
84db4d63cd
commit
d56445c745
@ -400,13 +400,10 @@ impl Rpc {
|
||||
.filter_map(|r| {
|
||||
let result: Result<Confirmed> = r.read();
|
||||
match result.as_ref().map(|confirmed| confirmed.txid) {
|
||||
Ok(read_txid) if read_txid == *txid => Some(result),
|
||||
Ok(read_txid) => {
|
||||
if read_txid == *txid {
|
||||
Some(result)
|
||||
} else {
|
||||
warn!("read {}, expecting {}", read_txid, txid);
|
||||
None
|
||||
}
|
||||
warn!("read {}, expecting {}", read_txid, txid);
|
||||
None
|
||||
}
|
||||
Err(_) => Some(result),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user