1
0
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:
Roman Zeyde 2020-10-31 14:35:30 +02:00
parent 84db4d63cd
commit d56445c745
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

View File

@ -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),
}