mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Add code to handle a race condition around first_preprocess
This commit is contained in:
@@ -92,7 +92,7 @@ impl<'a, D: Db> MainDb<'a, D> {
|
||||
}
|
||||
txn.put(key, preprocess);
|
||||
}
|
||||
pub fn first_preprocess<G: Get>(getter: &G, id: [u8; 32]) -> Vec<u8> {
|
||||
getter.get(Self::first_preprocess_key(id)).expect("asked for first preprocess we never saved")
|
||||
pub fn first_preprocess<G: Get>(getter: &G, id: [u8; 32]) -> Option<Vec<u8>> {
|
||||
getter.get(Self::first_preprocess_key(id))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user