pub struct SetMirrorAdvertiseUrlsResult {
pub mirror_advertise: MirrorAdvertiseView,
pub requires_restart: bool,
}Expand description
control.config.setMirrorAdvertiseUrls — the persisted view, plus whether it IS the live
answer yet.
This does NOT reuse MirrorAdvertiseView alone the way CollateralMarginResult is shared
between .get and .set, because unlike a margin this override has a genuine “not yet live”
state a bare view cannot express. ConfigSetUpstream’s
sibling result already carries exactly this shape (requires_restart) — restated here rather
than reused because the TRUTH VALUE differs per method, not merely the field name.
Fields§
§mirror_advertise: MirrorAdvertiseViewWhat a follow-up control.config.get will show ONCE this takes effect. See
Self::requires_restart for whether that is now or after a restart.
requires_restart: boolWhether dig-node must be RESTARTED before Self::mirror_advertise is the answer a LIVE
config.get would give.
This is a report of what THIS node’s implementation actually did, never a value this
contract fixes — unlike SetUpstreamResult::requires_restart, which is unconditionally
true because that override feeds Config::from_env at process start and can never be
read any other way. This override is different in kind: dig-node#562’s advertise decision
is recomputed every mirror-coin-creation pass rather than read once at start, so LIVE is a
real, reachable answer here.
It is not, however, the answer TODAY. dig-node#562’s recomputation reads
DIG_MIRROR_ADVERTISE_URLS from the OS ENVIRONMENT of the running process
(std::env::var), and no control call can change the environment of a process already
running — so until dig-node persists this override somewhere its own advertise pass
actually re-reads (a config-store write this call feeds, rather than an environment
variable), a conforming node MUST answer true here. It MUST answer false the moment it
does, and this field is what lets that improvement ship without a wire-contract change: a
client that renders “saved” only when this is false never tells an operator their node is
advertising a URL it is not.
Trait Implementations§
Source§impl Clone for SetMirrorAdvertiseUrlsResult
impl Clone for SetMirrorAdvertiseUrlsResult
Source§fn clone(&self) -> SetMirrorAdvertiseUrlsResult
fn clone(&self) -> SetMirrorAdvertiseUrlsResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more