This commit is contained in:
farnyser 2024-04-25 12:41:51 +00:00
parent da3e420f09
commit a8582b5cbf
79 changed files with 150 additions and 148 deletions

View File

@ -1 +1 @@
{"rustc_fingerprint":16650037298897574922,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.70.0 (90c541806 2023-05-31)\nbinary: rustc\ncommit-hash: 90c541806f23a127002de5b4038be731ba1458ca\ncommit-date: 2023-05-31\nhost: x86_64-unknown-linux-gnu\nrelease: 1.70.0\nLLVM version: 16.0.2\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/runner/.rustup/toolchains/1.70-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
{"rustc_fingerprint":1512468125310580077,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/runner/.rustup/toolchains/1.70-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.70.0 (90c541806 2023-05-31)\nbinary: rustc\ncommit-hash: 90c541806f23a127002de5b4038be731ba1458ca\ncommit-date: 2023-05-31\nhost: x86_64-unknown-linux-gnu\nrelease: 1.70.0\nLLVM version: 16.0.2\n","stderr":""}},"successes":{}}

View File

@ -22,7 +22,7 @@ functions to access some kinds of data with less overhead.</p>
min_slot: Slot,
timeout: <a class="struct" href="https://doc.rust-lang.org/1.70.0/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>
) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.75/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.70.0/std/primitive.unit.html">()</a>&gt;</h4></section></summary><div class="docblock"><p>Return success once all addresses have data &gt;= min_slot</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AccountFetcher-for-AccountFetcher" class="impl"><a class="srclink rightside" href="../../src/mango_v4_client/chain_data_fetcher.rs.html#204-261">source</a><a href="#impl-AccountFetcher-for-AccountFetcher" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.AccountFetcher.html" title="trait mango_v4_client::AccountFetcher">AccountFetcher</a> for <a class="struct" href="struct.AccountFetcher.html" title="struct mango_v4_client::chain_data::AccountFetcher">AccountFetcher</a></h3></section></summary><div class="impl-items"><section id="method.fetch_raw_account" class="method trait-impl"><a class="srclink rightside" href="../../src/mango_v4_client/chain_data_fetcher.rs.html#205-210">source</a><a href="#method.fetch_raw_account" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.AccountFetcher.html#tymethod.fetch_raw_account" class="fn">fetch_raw_account</a>&lt;'life0, 'life1, 'async_trait&gt;(
</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-AccountFetcher-for-AccountFetcher" class="impl"><a class="srclink rightside" href="../../src/mango_v4_client/chain_data_fetcher.rs.html#204-262">source</a><a href="#impl-AccountFetcher-for-AccountFetcher" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="../trait.AccountFetcher.html" title="trait mango_v4_client::AccountFetcher">AccountFetcher</a> for <a class="struct" href="struct.AccountFetcher.html" title="struct mango_v4_client::chain_data::AccountFetcher">AccountFetcher</a></h3></section></summary><div class="impl-items"><section id="method.fetch_raw_account" class="method trait-impl"><a class="srclink rightside" href="../../src/mango_v4_client/chain_data_fetcher.rs.html#205-210">source</a><a href="#method.fetch_raw_account" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.AccountFetcher.html#tymethod.fetch_raw_account" class="fn">fetch_raw_account</a>&lt;'life0, 'life1, 'async_trait&gt;(
&amp;'life0 self,
address: &amp;'life1 Pubkey
) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.70.0/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.70.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.70.0/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>&lt;Output = <a class="type" href="https://docs.rs/anyhow/1.0.75/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;AccountSharedData&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/1.70.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait&gt;&gt;<span class="where fmt-newline">where
@ -41,13 +41,13 @@ functions to access some kinds of data with less overhead.</p>
) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.70.0/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.70.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.70.0/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>&lt;Output = <a class="type" href="https://docs.rs/anyhow/1.0.75/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.70.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;(Pubkey, AccountSharedData)&gt;&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/1.70.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait&gt;&gt;<span class="where fmt-newline">where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</span></h4></section><section id="method.fetch_multiple_accounts" class="method trait-impl"><a class="srclink rightside" href="../../src/mango_v4_client/chain_data_fetcher.rs.html#246-255">source</a><a href="#method.fetch_multiple_accounts" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.AccountFetcher.html#tymethod.fetch_multiple_accounts" class="fn">fetch_multiple_accounts</a>&lt;'life0, 'life1, 'async_trait&gt;(
'life1: 'async_trait,</span></h4></section><section id="method.fetch_multiple_accounts" class="method trait-impl"><a class="srclink rightside" href="../../src/mango_v4_client/chain_data_fetcher.rs.html#246-256">source</a><a href="#method.fetch_multiple_accounts" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.AccountFetcher.html#tymethod.fetch_multiple_accounts" class="fn">fetch_multiple_accounts</a>&lt;'life0, 'life1, 'async_trait&gt;(
&amp;'life0 self,
keys: &amp;'life1 [Pubkey]
) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.70.0/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.70.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.70.0/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>&lt;Output = <a class="type" href="https://docs.rs/anyhow/1.0.75/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.70.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;(Pubkey, AccountSharedData)&gt;&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/1.70.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait&gt;&gt;<span class="where fmt-newline">where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</span></h4></section><section id="method.get_slot" class="method trait-impl"><a class="srclink rightside" href="../../src/mango_v4_client/chain_data_fetcher.rs.html#257-260">source</a><a href="#method.get_slot" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.AccountFetcher.html#tymethod.get_slot" class="fn">get_slot</a>&lt;'life0, 'async_trait&gt;(
'life1: 'async_trait,</span></h4></section><section id="method.get_slot" class="method trait-impl"><a class="srclink rightside" href="../../src/mango_v4_client/chain_data_fetcher.rs.html#258-261">source</a><a href="#method.get_slot" class="anchor">§</a><h4 class="code-header">fn <a href="../trait.AccountFetcher.html#tymethod.get_slot" class="fn">get_slot</a>&lt;'life0, 'async_trait&gt;(
&amp;'life0 self
) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.70.0/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.70.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.70.0/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>&lt;Output = <a class="type" href="https://docs.rs/anyhow/1.0.75/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.70.0/std/primitive.u64.html">u64</a>&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/1.70.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait&gt;&gt;<span class="where fmt-newline">where
Self: 'async_trait,

View File

@ -65,4 +65,4 @@
) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.70.0/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.70.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.70.0/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a>&lt;Output = <a class="type" href="https://docs.rs/anyhow/1.0.75/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;AccountSharedData&gt;&gt; + <a class="trait" href="https://doc.rust-lang.org/1.70.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait&gt;&gt;<span class="where fmt-newline">where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,</span></h4></section></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-AccountFetcher-for-AccountFetcher" class="impl"><a class="srclink rightside" href="../src/mango_v4_client/chain_data_fetcher.rs.html#204-261">source</a><a href="#impl-AccountFetcher-for-AccountFetcher" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AccountFetcher.html" title="trait mango_v4_client::AccountFetcher">AccountFetcher</a> for <a class="struct" href="chain_data/struct.AccountFetcher.html" title="struct mango_v4_client::chain_data::AccountFetcher">AccountFetcher</a></h3></section><section id="impl-AccountFetcher-for-RpcAccountFetcher" class="impl"><a class="srclink rightside" href="../src/mango_v4_client/account_fetcher.rs.html#72-125">source</a><a href="#impl-AccountFetcher-for-RpcAccountFetcher" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AccountFetcher.html" title="trait mango_v4_client::AccountFetcher">AccountFetcher</a> for <a class="struct" href="struct.RpcAccountFetcher.html" title="struct mango_v4_client::RpcAccountFetcher">RpcAccountFetcher</a></h3></section><section id="impl-AccountFetcher-for-CachedAccountFetcher%3CT%3E" class="impl"><a class="srclink rightside" href="../src/mango_v4_client/account_fetcher.rs.html#205-346">source</a><a href="#impl-AccountFetcher-for-CachedAccountFetcher%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.AccountFetcher.html" title="trait mango_v4_client::AccountFetcher">AccountFetcher</a> + 'static&gt; <a class="trait" href="trait.AccountFetcher.html" title="trait mango_v4_client::AccountFetcher">AccountFetcher</a> for <a class="struct" href="struct.CachedAccountFetcher.html" title="struct mango_v4_client::CachedAccountFetcher">CachedAccountFetcher</a>&lt;T&gt;</h3></section></div><script src="../implementors/mango_v4_client/account_fetcher/trait.AccountFetcher.js" async></script></section></div></main></body></html>
'life1: 'async_trait,</span></h4></section></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-AccountFetcher-for-AccountFetcher" class="impl"><a class="srclink rightside" href="../src/mango_v4_client/chain_data_fetcher.rs.html#204-262">source</a><a href="#impl-AccountFetcher-for-AccountFetcher" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AccountFetcher.html" title="trait mango_v4_client::AccountFetcher">AccountFetcher</a> for <a class="struct" href="chain_data/struct.AccountFetcher.html" title="struct mango_v4_client::chain_data::AccountFetcher">AccountFetcher</a></h3></section><section id="impl-AccountFetcher-for-RpcAccountFetcher" class="impl"><a class="srclink rightside" href="../src/mango_v4_client/account_fetcher.rs.html#72-125">source</a><a href="#impl-AccountFetcher-for-RpcAccountFetcher" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.AccountFetcher.html" title="trait mango_v4_client::AccountFetcher">AccountFetcher</a> for <a class="struct" href="struct.RpcAccountFetcher.html" title="struct mango_v4_client::RpcAccountFetcher">RpcAccountFetcher</a></h3></section><section id="impl-AccountFetcher-for-CachedAccountFetcher%3CT%3E" class="impl"><a class="srclink rightside" href="../src/mango_v4_client/account_fetcher.rs.html#205-346">source</a><a href="#impl-AccountFetcher-for-CachedAccountFetcher%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.AccountFetcher.html" title="trait mango_v4_client::AccountFetcher">AccountFetcher</a> + 'static&gt; <a class="trait" href="trait.AccountFetcher.html" title="trait mango_v4_client::AccountFetcher">AccountFetcher</a> for <a class="struct" href="struct.CachedAccountFetcher.html" title="struct mango_v4_client::CachedAccountFetcher">CachedAccountFetcher</a>&lt;T&gt;</h3></section></div><script src="../implementors/mango_v4_client/account_fetcher/trait.AccountFetcher.js" async></script></section></div></main></body></html>

File diff suppressed because one or more lines are too long

View File

@ -259,6 +259,7 @@
<a href="#259" id="259">259</a>
<a href="#260" id="260">260</a>
<a href="#261" id="261">261</a>
<a href="#262" id="262">262</a>
</pre></div><pre class="rust"><code><span class="kw">use </span>std::sync::{Arc, RwLock};
<span class="kw">use </span>std::thread;
<span class="kw">use </span>std::time::{Duration, Instant};
@ -509,10 +510,11 @@
keys: <span class="kw-2">&amp;</span>[Pubkey],
) -&gt; anyhow::Result&lt;Vec&lt;(Pubkey, AccountSharedData)&gt;&gt; {
<span class="kw">let </span>chain_data = <span class="self">self</span>.chain_data.read().unwrap();
<span class="prelude-val">Ok</span>(keys
<span class="kw">let </span>result = keys
.iter()
.map(|pk| (<span class="kw-2">*</span>pk, chain_data.account(pk).unwrap().account.clone()))
.collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;())
.map(|pk| chain_data.account(pk).map(|x| (<span class="kw-2">*</span>pk, x.account.clone())))
.collect::&lt;anyhow::Result&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;&gt;();
result
}
<span class="kw">async fn </span>get_slot(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; anyhow::Result&lt;u64&gt; {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long