Merge branch 'veilidchat-work' into 'main'
This commit is contained in:
@@ -395,10 +395,16 @@ impl NetworkInterfaces {
|
||||
continue;
|
||||
}
|
||||
if let Some(pipv4) = intf.primary_ipv4() {
|
||||
intf_addrs.push(pipv4);
|
||||
// Skip temporary addresses because they're going to change
|
||||
if !pipv4.is_temporary() {
|
||||
intf_addrs.push(pipv4);
|
||||
}
|
||||
}
|
||||
if let Some(pipv6) = intf.primary_ipv6() {
|
||||
intf_addrs.push(pipv6);
|
||||
// Skip temporary addresses because they're going to change
|
||||
if !pipv6.is_temporary() {
|
||||
intf_addrs.push(pipv6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1678,7 +1678,10 @@ impl RPCProcessor {
|
||||
|
||||
let send_channel = {
|
||||
let inner = self.inner.lock();
|
||||
inner.send_channel.as_ref().unwrap().clone()
|
||||
let Some(send_channel) = inner.send_channel.as_ref().cloned() else {
|
||||
bail!("send channel is closed");
|
||||
};
|
||||
send_channel
|
||||
};
|
||||
let span_id = Span::current().id();
|
||||
send_channel
|
||||
@@ -1714,7 +1717,10 @@ impl RPCProcessor {
|
||||
};
|
||||
let send_channel = {
|
||||
let inner = self.inner.lock();
|
||||
inner.send_channel.as_ref().unwrap().clone()
|
||||
let Some(send_channel) = inner.send_channel.as_ref().cloned() else {
|
||||
bail!("send channel is closed");
|
||||
};
|
||||
send_channel
|
||||
};
|
||||
let span_id = Span::current().id();
|
||||
send_channel
|
||||
@@ -1753,7 +1759,10 @@ impl RPCProcessor {
|
||||
|
||||
let send_channel = {
|
||||
let inner = self.inner.lock();
|
||||
inner.send_channel.as_ref().unwrap().clone()
|
||||
let Some(send_channel) = inner.send_channel.as_ref().cloned() else {
|
||||
bail!("send channel is closed");
|
||||
};
|
||||
send_channel
|
||||
};
|
||||
let span_id = Span::current().id();
|
||||
send_channel
|
||||
|
@@ -380,7 +380,7 @@ impl StorageManager {
|
||||
|
||||
// Add to offline writes to flush
|
||||
inner.offline_subkey_writes.entry(key).and_modify(|x| { x.insert(subkey); } ).or_insert(ValueSubkeyRangeSet::single(subkey));
|
||||
return Ok(Some(signed_value_data.into_value_data()))
|
||||
return Ok(None)
|
||||
};
|
||||
|
||||
// Drop the lock for network access
|
||||
@@ -393,7 +393,7 @@ impl StorageManager {
|
||||
key,
|
||||
subkey,
|
||||
safety_selection,
|
||||
signed_value_data,
|
||||
signed_value_data.clone(),
|
||||
descriptor,
|
||||
)
|
||||
.await?;
|
||||
@@ -404,7 +404,13 @@ impl StorageManager {
|
||||
.handle_set_local_value(key, subkey, final_signed_value_data.clone())
|
||||
.await?;
|
||||
|
||||
Ok(Some(final_signed_value_data.into_value_data()))
|
||||
// Return the new value if it differs from what was asked to set
|
||||
if final_signed_value_data.value_data() != signed_value_data.value_data() {
|
||||
return Ok(Some(final_signed_value_data.into_value_data()));
|
||||
}
|
||||
|
||||
// If the original value was set, return None
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
pub async fn watch_values(
|
||||
|
Reference in New Issue
Block a user