mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-06-15 08:58:29 +08:00
fix: do not panic
This commit is contained in:
@@ -363,9 +363,17 @@ fn load_predicates_from_redis(
|
||||
let mut predicates = vec![];
|
||||
for key in chainhooks_to_load.iter() {
|
||||
let chainhook = match redis_con.hget::<_, _, String>(key, "specification") {
|
||||
Ok(spec) => {
|
||||
ChainhookSpecification::deserialize_specification(&spec, key).unwrap()
|
||||
// todo
|
||||
Ok(spec) => match ChainhookSpecification::deserialize_specification(&spec, key) {
|
||||
Ok(spec) => spec,
|
||||
Err(e) => {
|
||||
error!(
|
||||
ctx.expect_logger(),
|
||||
"unable to load chainhook associated with key {}: {}",
|
||||
key,
|
||||
e.to_string()
|
||||
);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
error!(
|
||||
|
||||
Reference in New Issue
Block a user