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| {
|
.filter_map(|r| {
|
||||||
let result: Result<Confirmed> = r.read();
|
let result: Result<Confirmed> = r.read();
|
||||||
match result.as_ref().map(|confirmed| confirmed.txid) {
|
match result.as_ref().map(|confirmed| confirmed.txid) {
|
||||||
|
Ok(read_txid) if read_txid == *txid => Some(result),
|
||||||
Ok(read_txid) => {
|
Ok(read_txid) => {
|
||||||
if read_txid == *txid {
|
warn!("read {}, expecting {}", read_txid, txid);
|
||||||
Some(result)
|
None
|
||||||
} else {
|
|
||||||
warn!("read {}, expecting {}", read_txid, txid);
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Err(_) => Some(result),
|
Err(_) => Some(result),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user