mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 01:01:04 +00:00
Handle local storage race conditions better (#3177)
* Make local_storage_compare_and_set take Option for old_value * Adapt srml/im-online to API changes * Bump version * Bump version again * Replace match
This commit is contained in:
committed by
Gavin Wood
parent
af914e9f40
commit
23fba990ba
@@ -306,7 +306,12 @@ export_api! {
|
||||
///
|
||||
/// Note this storage is not part of the consensus, it's only accessible by
|
||||
/// offchain worker tasks running on the same machine. It IS persisted between runs.
|
||||
fn local_storage_compare_and_set(kind: StorageKind, key: &[u8], old_value: &[u8], new_value: &[u8]) -> bool;
|
||||
fn local_storage_compare_and_set(
|
||||
kind: StorageKind,
|
||||
key: &[u8],
|
||||
old_value: Option<&[u8]>,
|
||||
new_value: &[u8]
|
||||
) -> bool;
|
||||
|
||||
/// Gets a value from the local storage.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user