on some call sites: peerstate.save_to_db() should bubble up errors instead of crashing.

also write a test that double-creation of an addr-row is fine.
This commit is contained in:
holger krekel
2019-10-01 00:20:08 +02:00
committed by Floris Bruynooghe
parent 22d2097132
commit ee6d16f1b1
4 changed files with 45 additions and 10 deletions

View File

@@ -1672,7 +1672,7 @@ fn check_verified_properties(
let fp = peerstate.gossip_key_fingerprint.clone();
if let Some(fp) = fp {
peerstate.set_verified(0, &fp, 2);
peerstate.save_to_db(&context.sql, false).unwrap();
peerstate.save_to_db(&context.sql, false)?;
is_verified = true;
}
}