Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 010abcf 🚀
Browse files Browse the repository at this point in the history
github-merge-queue[bot] committed Nov 20, 2023
1 parent 8f137d0 commit 442b7ad
Showing 18 changed files with 63 additions and 37 deletions.
2 changes: 1 addition & 1 deletion domain_test_service/domain/struct.DomainNodeBuilder.html
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
self,
role: Role,
domain_id: <a class="struct" href="../../sp_domains/struct.DomainId.html" title="struct sp_domains::DomainId">DomainId</a>,
mock_consensus_node: &amp;mut MockConsensusNode
mock_consensus_node: &amp;mut <a class="struct" href="../../subspace_test_service/struct.MockConsensusNode.html" title="struct subspace_test_service::MockConsensusNode">MockConsensusNode</a>
) -&gt; <a class="type" href="type.EvmDomainNode.html" title="type domain_test_service::domain::EvmDomainNode">EvmDomainNode</a></h4></section></summary><div class="docblock"><p>Build a evm domain node</p>
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-DomainNodeBuilder" class="impl"><a href="#impl-RefUnwindSafe-for-DomainNodeBuilder" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.DomainNodeBuilder.html" title="struct domain_test_service::domain::DomainNodeBuilder">DomainNodeBuilder</a></h3></section><section id="impl-Send-for-DomainNodeBuilder" class="impl"><a href="#impl-Send-for-DomainNodeBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.DomainNodeBuilder.html" title="struct domain_test_service::domain::DomainNodeBuilder">DomainNodeBuilder</a></h3></section><section id="impl-Sync-for-DomainNodeBuilder" class="impl"><a href="#impl-Sync-for-DomainNodeBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.DomainNodeBuilder.html" title="struct domain_test_service::domain::DomainNodeBuilder">DomainNodeBuilder</a></h3></section><section id="impl-Unpin-for-DomainNodeBuilder" class="impl"><a href="#impl-Unpin-for-DomainNodeBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.DomainNodeBuilder.html" title="struct domain_test_service::domain::DomainNodeBuilder">DomainNodeBuilder</a></h3></section><section id="impl-UnwindSafe-for-DomainNodeBuilder" class="impl"><a href="#impl-UnwindSafe-for-DomainNodeBuilder" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.DomainNodeBuilder.html" title="struct domain_test_service::domain::DomainNodeBuilder">DomainNodeBuilder</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#135">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#136">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T-1" class="impl"><a href="#impl-Any-for-T-1" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Any for T<span class="where fmt-newline">where
2 changes: 1 addition & 1 deletion implementors/core/marker/trait.Sync.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pallet_subspace/pallet/struct.Pallet.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pallet_subspace/pallet/type.Module.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/subspace_networking/constructor.rs.html
Original file line number Diff line number Diff line change
@@ -651,6 +651,7 @@
<a href="#651" id="651">651</a>
<a href="#652" id="652">652</a>
<a href="#653" id="653">653</a>
<a href="#654" id="654">654</a>
</pre></div><pre class="rust"><code><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">mod </span>temporary_bans;
<span class="kw">mod </span>transport;

@@ -1191,6 +1192,7 @@
..Default::default()
},
local_peer_id,
servers: bootstrap_addresses.clone(),
},
});

40 changes: 32 additions & 8 deletions src/subspace_networking/protocols/autonat_wrapper.rs.html
Original file line number Diff line number Diff line change
@@ -147,6 +147,18 @@
<a href="#147" id="147">147</a>
<a href="#148" id="148">148</a>
<a href="#149" id="149">149</a>
<a href="#150" id="150">150</a>
<a href="#151" id="151">151</a>
<a href="#152" id="152">152</a>
<a href="#153" id="153">153</a>
<a href="#154" id="154">154</a>
<a href="#155" id="155">155</a>
<a href="#156" id="156">156</a>
<a href="#157" id="157">157</a>
<a href="#158" id="158">158</a>
<a href="#159" id="159">159</a>
<a href="#160" id="160">160</a>
<a href="#161" id="161">161</a>
</pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::utils::is_global_address_or_dns;
<span class="kw">use </span>libp2p::autonat::{Behaviour <span class="kw">as </span>Autonat, Config <span class="kw">as </span>AutonatConfig, Event <span class="kw">as </span>AutonatEvent};
<span class="kw">use </span>libp2p::core::Endpoint;
@@ -163,27 +175,39 @@
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>Config {
<span class="kw">pub</span>(<span class="kw">crate</span>) inner_config: AutonatConfig,
<span class="kw">pub</span>(<span class="kw">crate</span>) local_peer_id: PeerId,
<span class="kw">pub</span>(<span class="kw">crate</span>) servers: Vec&lt;Multiaddr&gt;,
}

<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">struct </span>Behaviour {
inner: Autonat,
config: Config,
private_ips_enabled: bool,
listen_addresses: HashSet&lt;Multiaddr&gt;,
}

<span class="kw">impl </span>Behaviour {
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>new(config: Config) -&gt; <span class="self">Self </span>{
<span class="kw">let </span><span class="kw-2">mut </span>inner = Autonat::new(config.local_peer_id, config.inner_config.clone());

<span class="kw">for </span>server <span class="kw">in </span>config.servers {
<span class="kw">let </span>maybe_peer_id = server.iter().find_map(|protocol| {
<span class="kw">if let </span>Protocol::P2p(peer_id) = protocol {
<span class="prelude-val">Some</span>(peer_id)
} <span class="kw">else </span>{
<span class="prelude-val">None
</span>}
});
<span class="kw">if let </span><span class="prelude-val">Some</span>(peer_id) = maybe_peer_id {
inner.add_server(peer_id, <span class="prelude-val">Some</span>(server));
}
}

<span class="self">Self </span>{
inner: Autonat::new(config.local_peer_id, config.inner_config.clone()),
config,
inner,
private_ips_enabled: !config.inner_config.only_global_ips,
listen_addresses: Default::default(),
}
}

<span class="kw">fn </span>private_ips_enabled(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
!<span class="self">self</span>.config.inner_config.only_global_ips
}

<span class="kw">fn </span>address_corresponds_to_listening_addresses(<span class="kw-2">&amp;</span><span class="self">self</span>, addr: <span class="kw-2">&amp;</span>Multiaddr) -&gt; bool {
<span class="kw">let </span><span class="prelude-val">Some</span>(candidate_protocol) = addr.iter().find_map(|protocol| <span class="kw">match </span>protocol {
udp @ Protocol::Udp(<span class="kw">_</span>) =&gt; <span class="prelude-val">Some</span>(udp),
@@ -254,7 +278,7 @@
<span class="comment">//TODO: handle listener address change
</span><span class="self">self</span>.listen_addresses.insert(addr.addr.clone());

<span class="kw">if </span><span class="self">self</span>.private_ips_enabled() || is_global_address_or_dns(addr.addr) {
<span class="kw">if </span><span class="self">self</span>.private_ips_enabled || is_global_address_or_dns(addr.addr) {
<span class="self">self</span>.inner.on_swarm_event(new_listen_addr_event);
} <span class="kw">else </span>{
<span class="macro">debug!</span>(addr=<span class="question-mark">?</span>addr.addr, <span class="string">&quot;Skipped listening address in AutonatWrapper.&quot;</span>);
2 changes: 1 addition & 1 deletion subspace_farmer_components/plotting/fn.encode_sector.html
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@
downloaded_sector: <a class="struct" href="struct.DownloadedSector.html" title="struct subspace_farmer_components::plotting::DownloadedSector">DownloadedSector</a>,
encoding_options: <a class="struct" href="struct.EncodeSectorOptions.html" title="struct subspace_farmer_components::plotting::EncodeSectorOptions">EncodeSectorOptions</a>&lt;'_, PosTable&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.PlottedSector.html" title="struct subspace_farmer_components::plotting::PlottedSector">PlottedSector</a>, <a class="enum" href="enum.PlottingError.html" title="enum subspace_farmer_components::plotting::PlottingError">PlottingError</a>&gt;<span class="where fmt-newline">where
PosTable: <a class="trait" href="../../subspace_proof_of_space/trait.Table.html" title="trait subspace_proof_of_space::Table">Table</a>,</span></code></pre></section></div></main></body></html>
PosTable: Table,</span></code></pre></section></div></main></body></html>
2 changes: 1 addition & 1 deletion subspace_farmer_components/plotting/fn.plot_sector.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Plot a single sector."><title>plot_sector in subspace_farmer_components::plotting - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-deb46770fd761b69.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="subspace_farmer_components" data-themes="" data-resource-suffix="" data-rustdoc-version="1.75.0-nightly (42b1224e9 2023-10-15)" data-channel="nightly" data-search-js="search-8fbf244ebcf71464.js" data-settings-js="settings-74424d7eec62a23e.js" ><script src="../../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f34af1a0ee6bacd.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../subspace_farmer_components/index.html">subspace_farmer_components</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In subspace_farmer_components::plotting</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">subspace_farmer_components</a>::<wbr><a href="index.html">plotting</a>::<wbr><a class="fn" href="#">plot_sector</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/subspace_farmer_components/plotting.rs.html#210-257">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn plot_sector&lt;PosTable, PG&gt;(
options: <a class="struct" href="struct.PlotSectorOptions.html" title="struct subspace_farmer_components::plotting::PlotSectorOptions">PlotSectorOptions</a>&lt;'_, PosTable, PG&gt;
) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.PlottedSector.html" title="struct subspace_farmer_components::plotting::PlottedSector">PlottedSector</a>, <a class="enum" href="enum.PlottingError.html" title="enum subspace_farmer_components::plotting::PlottingError">PlottingError</a>&gt;<span class="where fmt-newline">where
PosTable: <a class="trait" href="../../subspace_proof_of_space/trait.Table.html" title="trait subspace_proof_of_space::Table">Table</a>,
PosTable: Table,
PG: <a class="trait" href="trait.PieceGetter.html" title="trait subspace_farmer_components::plotting::PieceGetter">PieceGetter</a>,</span></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Plot a single sector.</p>
<p>This is a convenient wrapper around <a href="fn.download_sector.html" title="fn subspace_farmer_components::plotting::download_sector"><code>download_sector</code></a> and <a href="fn.encode_sector.html" title="fn subspace_farmer_components::plotting::encode_sector"><code>encode_sector</code></a> functions.</p>
<p>NOTE: Even though this function is async, it has blocking code inside and must be running in a
Loading

0 comments on commit 442b7ad

Please sign in to comment.