clementine_tx_sender/
rpc_errors.rs

1use bitcoincore_rpc::Error;
2
3pub(crate) fn is_not_found_error(err: &Error) -> bool {
4    let s = err.to_string();
5    s.contains("No such mempool or blockchain transaction")
6        || s.contains("No such mempool transaction")
7        || s.contains("No such transaction")
8}
9
10pub(crate) fn is_mempool_not_found_error(err: &Error) -> bool {
11    let s = err.to_string();
12    s.contains("Transaction not in mempool")
13}
14
15pub(crate) fn is_rejecting_replacement_error(s: &str) -> bool {
16    s.contains("insufficient fee, rejecting replacement")
17}