Commit Graph

1725 Commits

Author SHA1 Message Date
Daniel Karzel
af60d3bb54
Network check upon spot price request 2021-05-20 13:03:29 +10:00
Daniel Karzel
02974811ad
Activate mainnet for the ASB
To run the ASB on testnet, one actively has to provide the `--testnet` flag.
Mainnet and testnet data and config are separated into sub-folders, i.e. `{data/config-dir}/asb/testnet` and `{data-dir}/asb/mainnet`.
The initial setup is also per network. If (default) config for the network cannot be found the initial setup is triggered.
Startup includes network check to ensure the bitcoin/monero network in config file is the same as the one in the `env::Config`.

Note: Wallet initialization is done with the network set in the `env::Config`, the network saved in the config file is just to indicate what network the config file is for.
2021-05-20 12:58:39 +10:00
Daniel Karzel
9ac5b635d7
Introduce own de-/serializable monero::Network 2021-05-20 12:58:30 +10:00
Daniel Karzel
69cf12620d
Activate mainnet for the CLI
This includes testing CLI commandline args
Clap's `default_value_with` actually did not work on `Subcommand`s because the parent's flags were not picked up.
This was fixed by changing parameters dependent on testnet/mainnet to options.
This problem should have been detected by tests, that's why the command line parameter tests were finally (re-)added.

Thanks to @rishflab for some pre-work for this.
2021-05-20 12:57:58 +10:00
dependabot[bot]
6c206c7067
Bump libp2p from 0.37.1 to 0.38.0
Bumps [libp2p](https://github.com/libp2p/rust-libp2p) from 0.37.1 to 0.38.0.
- [Release notes](https://github.com/libp2p/rust-libp2p/releases)
- [Changelog](https://github.com/libp2p/rust-libp2p/blob/master/CHANGELOG.md)
- [Commits](https://github.com/libp2p/rust-libp2p/compare/v0.37.1...v0.38.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-18 06:33:38 +00:00
bors[bot]
4f4303462a
Merge #511
511: Use tokio-tar from crates.io r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2021-05-18 05:08:44 +00:00
Thomas Eizinger
a3f436104f
Use tokio-tar from crates.io 2021-05-18 12:52:17 +10:00
bors[bot]
5373f697ed
Merge #486 #508
486: Update metadata and remove outdated config files / READMEs r=thomaseizinger a=thomaseizinger



508: Remove tokio-tar from workspace in favor of git dependency r=thomaseizinger a=thomaseizinger

Fixes #315.
Fixes #227.

The upstream PR that upgrades to tokio v1 got merged, hence we can at least point to the git dependency for now and remove that later once it has been released to crates.io

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2021-05-17 09:31:41 +00:00
bors[bot]
08c527a723
Merge #510
510: Bump tokio-util from 0.6.6 to 0.6.7 r=thomaseizinger a=dependabot[bot]

Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.6.6 to 0.6.7.
<details>
<summary>Commits</summary>
<ul>
<li><a href="deb1f98125"><code>deb1f98</code></a> chore: prepare tokio-util v0.6.7 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3784">#3784</a>)</li>
<li><a href="3a659c47c3"><code>3a659c4</code></a> chore: prepare tokio-mcaros v1.2.0 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3783">#3783</a>)</li>
<li><a href="580dc9594c"><code>580dc95</code></a> chore: prepare Tokio v1.6.0 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3782">#3782</a>)</li>
<li><a href="8c395dfe61"><code>8c395df</code></a> io: impl AsyncSeek for BufReader/BufWriter/BufStream (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3491">#3491</a>)</li>
<li><a href="e188e99ca3"><code>e188e99</code></a> process: avoid redundant effort to reap orphan processes (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3743">#3743</a>)</li>
<li><a href="0b93bd511d"><code>0b93bd5</code></a> net: support non-blocking vectored I/O (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3761">#3761</a>)</li>
<li><a href="d846bf24b1"><code>d846bf2</code></a> sync: Barrier doc should use task, not thread (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3780">#3780</a>)</li>
<li><a href="9ff7d8c352"><code>9ff7d8c</code></a> net: hide net::unix::datagram module from docs (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3775">#3775</a>)</li>
<li><a href="8324317005"><code>8324317</code></a> doc: fix doc-cfg on io::duplex, io::copy_bidirectional, and task::unconstrain...</li>
<li><a href="7207e3ca43"><code>7207e3c</code></a> signal: use std::os::raw::c_int instead of libc::c_int on public API (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3774">#3774</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/tokio-rs/tokio/compare/tokio-util-0.6.6...tokio-util-0.6.7">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio-util&package-manager=cargo&previous-version=0.6.6&new-version=0.6.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 09:09:11 +00:00
bors[bot]
c665ab1f26
Merge #509
509: Bump tokio from 1.5.0 to 1.6.0 r=thomaseizinger a=dependabot[bot]

Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.5.0 to 1.6.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/tokio-rs/tokio/releases">tokio's releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.6.0</h2>
<h1>1.6.0 (May 14, 2021)</h1>
<h3>Added</h3>
<ul>
<li>fs: try doing a non-blocking read before punting to the threadpool (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3518">#3518</a>)</li>
<li>io: add <code>write_all_buf</code> to <code>AsyncWriteExt</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3737">#3737</a>)</li>
<li>io: implement <code>AsyncSeek</code> for <code>BufReader</code>, <code>BufWriter</code>, and <code>BufStream</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3491">#3491</a>)</li>
<li>net: support non-blocking vectored I/O (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3761">#3761</a>)</li>
<li>sync: add <code>mpsc::Sender::{reserve_owned, try_reserve_owned}</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3704">#3704</a>)</li>
<li>sync: add a <code>MutexGuard::map</code> method that returns a <code>MappedMutexGuard</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/2472">#2472</a>)</li>
<li>time: add getter for Interval's period (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3705">#3705</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>io: wake pending writers on <code>DuplexStream</code> close (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3756">#3756</a>)</li>
<li>process: avoid redundant effort to reap orphan processes (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3743">#3743</a>)</li>
<li>signal: use <code>std::os::raw::c_int</code> instead of <code>libc::c_int</code> on public API (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3774">#3774</a>)</li>
<li>sync: preserve permit state in <code>notify_waiters</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3660">#3660</a>)</li>
<li>task: update <code>JoinHandle</code> panic message (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3727">#3727</a>)</li>
<li>time: prevent <code>time::advance</code> from going too far (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3712">#3712</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>net: hide <code>net::unix::datagram</code> module from docs (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3775">#3775</a>)</li>
<li>process: updated example (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3748">#3748</a>)</li>
<li>sync: <code>Barrier</code> doc should use task, not thread (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3780">#3780</a>)</li>
<li>task: update documentation on <code>block_in_place</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3753">#3753</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="580dc9594c"><code>580dc95</code></a> chore: prepare Tokio v1.6.0 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3782">#3782</a>)</li>
<li><a href="8c395dfe61"><code>8c395df</code></a> io: impl AsyncSeek for BufReader/BufWriter/BufStream (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3491">#3491</a>)</li>
<li><a href="e188e99ca3"><code>e188e99</code></a> process: avoid redundant effort to reap orphan processes (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3743">#3743</a>)</li>
<li><a href="0b93bd511d"><code>0b93bd5</code></a> net: support non-blocking vectored I/O (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3761">#3761</a>)</li>
<li><a href="d846bf24b1"><code>d846bf2</code></a> sync: Barrier doc should use task, not thread (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3780">#3780</a>)</li>
<li><a href="9ff7d8c352"><code>9ff7d8c</code></a> net: hide net::unix::datagram module from docs (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3775">#3775</a>)</li>
<li><a href="8324317005"><code>8324317</code></a> doc: fix doc-cfg on io::duplex, io::copy_bidirectional, and task::unconstrain...</li>
<li><a href="7207e3ca43"><code>7207e3c</code></a> signal: use std::os::raw::c_int instead of libc::c_int on public API (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3774">#3774</a>)</li>
<li><a href="312321cbd3"><code>312321c</code></a> chore: enable syntax highlighting for toml in readme</li>
<li><a href="17c7ce616c"><code>17c7ce6</code></a> benches: fix build error (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/3769">#3769</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/tokio-rs/tokio/compare/tokio-1.5.0...tokio-1.6.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.5.0&new-version=1.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 08:24:11 +00:00
dependabot[bot]
c16e06e16e
Bump tokio-util from 0.6.6 to 0.6.7
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.6.6 to 0.6.7.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.6.6...tokio-util-0.6.7)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 07:30:34 +00:00
dependabot[bot]
020cc3d78c
Bump tokio from 1.5.0 to 1.6.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.5.0...tokio-1.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 07:30:22 +00:00
Thomas Eizinger
75c5db53b2
Remove tokio-tar from workspace in favor of git dependency
Fixes #315.
Fixes #227.
2021-05-17 11:04:20 +10:00
Thomas Eizinger
2f2b3b8a19
Update metadata and remove outdated config files / READMEs 2021-05-17 11:03:43 +10:00
bors[bot]
b4143637aa
Merge #500
500: Bump sha2 from 0.9.4 to 0.9.5 r=thomaseizinger a=dependabot[bot]

Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.9.4 to 0.9.5.
<details>
<summary>Commits</summary>
<ul>
<li><a href="06586d8ee8"><code>06586d8</code></a> sha-1 v0.9.6 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/271">#271</a>)</li>
<li><a href="ca27667a75"><code>ca27667</code></a> sha1+sha2: use cpufeatures v0.1.1 crate release (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/269">#269</a>)</li>
<li><a href="12493fc7af"><code>12493fc</code></a> sha1: use <code>cpufeatures</code> to detect SHA-1 on <code>aarch64</code> (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/268">#268</a>)</li>
<li><a href="d13936a82a"><code>d13936a</code></a> sha2: use <code>cpufeatures</code> to detect <code>sha2</code> on <code>aarch64</code> (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/267">#267</a>)</li>
<li><a href="15a0468e98"><code>15a0468</code></a> sha2: fix missing documentation on compression functions (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/266">#266</a>)</li>
<li>See full diff in <a href="https://github.com/RustCrypto/hashes/compare/sha2-v0.9.4...sha2-v0.9.5">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sha2&package-manager=cargo&previous-version=0.9.4&new-version=0.9.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 01:02:53 +00:00
bors[bot]
849cda9994
Merge #505
505: Bump serde from 1.0.125 to 1.0.126 r=thomaseizinger a=dependabot[bot]

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.125 to 1.0.126.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/serde-rs/serde/releases">serde's releases</a>.</em></p>
<blockquote>
<h2>v1.0.126</h2>
<ul>
<li>Resolve conflict with <code>forbid(future_incompatible)</code> lint setting in generated code (<a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2026">#2026</a>, thanks <a href="https://github.com/hyd-dev"><code>@​hyd-dev</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="d9c338ec4a"><code>d9c338e</code></a> Release 1.0.126</li>
<li><a href="699bf3a75d"><code>699bf3a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2026">#2026</a> from hyd-dev/warning</li>
<li><a href="dd29825217"><code>dd29825</code></a> Allow only <code>unused_extern_crates</code> instead of the whole <code>rust_2018_idioms</code> lin...</li>
<li><a href="6366f17da7"><code>6366f17</code></a> Ignore clone_instead_of_copied pedantic clippy lint</li>
<li><a href="1120e5af4a"><code>1120e5a</code></a> Remove suppression of removed clippy lint</li>
<li><a href="1093f7e232"><code>1093f7e</code></a> Resolve flat_map_option pedantic clippy lint</li>
<li><a href="2ea132b8c4"><code>2ea132b</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/serde/issues/2018">#2018</a> from dtolnay/nonascii</li>
<li><a href="2ebc771b88"><code>2ebc771</code></a> Remove non_ascii_idents feature gate from test suite</li>
<li><a href="c17c4eef18"><code>c17c4ee</code></a> Unify stable and beta CI workflow</li>
<li><a href="7aa4950504"><code>7aa4950</code></a> Release serde_derive_internals 0.26.0</li>
<li>Additional commits viewable in <a href="https://github.com/serde-rs/serde/compare/v1.0.125...v1.0.126">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.125&new-version=1.0.126)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-16 17:39:23 +00:00
bors[bot]
270526f7e0
Merge #499
499: Bump futures from 0.3.14 to 0.3.15 r=thomaseizinger a=dependabot[bot]

Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.14 to 0.3.15.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/rust-lang/futures-rs/releases">futures's releases</a>.</em></p>
<blockquote>
<h2>0.3.15</h2>
<ul>
<li>Use <code>#[proc_macro]</code> at Rust 1.45+ to fix an issue where proc macros don't work with rust-analyzer (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2407">#2407</a>)</li>
<li>Support targets that do not have atomic CAS on stable Rust (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2400">#2400</a>)</li>
<li>futures-test: Add async <code>#[test]</code> function attribute (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2409">#2409</a>)</li>
<li>Add <code>stream::abortable</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2410">#2410</a>)</li>
<li>Add <code>FuturesUnordered::clear</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2415">#2415</a>)</li>
<li>Implement <code>IntoIterator</code> for <code>FuturesUnordered</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2423">#2423</a>)</li>
<li>Implement <code>Send</code> and <code>Sync</code> for <code>FuturesUnordered</code> iterators (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2416">#2416</a>)</li>
<li>Make <code>FuturesUnordered::iter_pin_ref</code> public (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2423">#2423</a>)</li>
<li>Add <code>SelectAll::clear</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2430">#2430</a>)</li>
<li>Add <code>SelectAll::{iter, iter_mut}</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2428">#2428</a>)</li>
<li>Implement <code>IntoIterator</code> for <code>SelectAll</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2428">#2428</a>)</li>
<li>Implement <code>Clone</code> for <code>WeakShared</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2396">#2396</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md">futures's changelog</a>.</em></p>
<blockquote>
<h1>0.3.15 - 2021-05-11</h1>
<ul>
<li>Use <code>#[proc_macro]</code> at Rust 1.45+ to fix an issue where proc macros don't work with rust-analyzer (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2407">#2407</a>)</li>
<li>Support targets that do not have atomic CAS on stable Rust (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2400">#2400</a>)</li>
<li>futures-test: Add async <code>#[test]</code> function attribute (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2409">#2409</a>)</li>
<li>Add <code>stream::abortable</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2410">#2410</a>)</li>
<li>Add <code>FuturesUnordered::clear</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2415">#2415</a>)</li>
<li>Implement <code>IntoIterator</code> for <code>FuturesUnordered</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2423">#2423</a>)</li>
<li>Implement <code>Send</code> and <code>Sync</code> for <code>FuturesUnordered</code> iterators (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2416">#2416</a>)</li>
<li>Make <code>FuturesUnordered::iter_pin_ref</code> public (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2423">#2423</a>)</li>
<li>Add <code>SelectAll::clear</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2430">#2430</a>)</li>
<li>Add <code>SelectAll::{iter, iter_mut}</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2428">#2428</a>)</li>
<li>Implement <code>IntoIterator</code> for <code>SelectAll</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2428">#2428</a>)</li>
<li>Implement <code>Clone</code> for <code>WeakShared</code> (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2396">#2396</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="fc080d153b"><code>fc080d1</code></a> Release 0.3.15 (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2436">#2436</a>)</li>
<li><a href="3d3b6642dd"><code>3d3b664</code></a> Remove extra text from test attribute docs (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2435">#2435</a>)</li>
<li><a href="5954cff771"><code>5954cff</code></a> futures-macro: improve diagnostics on type mismatch (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2433">#2433</a>)</li>
<li><a href="56bc87ef09"><code>56bc87e</code></a> Change SelectAll iterators to return stream instead of StreamFuture (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2431">#2431</a>)</li>
<li><a href="579b98b73d"><code>579b98b</code></a> Add SelectAll::clear (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2430">#2430</a>)</li>
<li><a href="d663bc1517"><code>d663bc1</code></a> expose iterators from SelectAll (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2428">#2428</a>)</li>
<li><a href="37d15b7528"><code>37d15b7</code></a> Abortable streams (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2410">#2410</a>)</li>
<li><a href="5912e2e8b1"><code>5912e2e</code></a> Add FuturesUnordered::clear (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2415">#2415</a>)</li>
<li><a href="48d65c33e7"><code>48d65c3</code></a> add FuturesUnordered::into_iter, make iter_pin_ref public (<a href="https://github-redirect.dependabot.com/rust-lang/futures-rs/issues/2423">#2423</a>)</li>
<li><a href="aa39d144fd"><code>aa39d14</code></a> Rename Take::limit_ field to limit</li>
<li>Additional commits viewable in <a href="https://github.com/rust-lang/futures-rs/compare/0.3.14...0.3.15">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=futures&package-manager=cargo&previous-version=0.3.14&new-version=0.3.15)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-16 17:08:34 +00:00
bors[bot]
b7ae88c436
Merge #495
495: Bump actions/checkout from 2 to 2.3.4 r=thomaseizinger a=dependabot[bot]

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p>
<blockquote>
<h2>v2.3.4</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/379">Add missing <code>await</code>s</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/360">Swap to Environment Files</a></li>
</ul>
<h2>v2.3.3</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/345">Remove Unneeded commit information from build logs</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/326">Add Licensed to verify third party dependencies</a></li>
</ul>
<h2>v2.3.2</h2>
<p><a href="https://github-redirect.dependabot.com/actions/checkout/pull/320">Add Third Party License Information to Dist Files</a></p>
<h2>v2.3.1</h2>
<p><a href="https://github-redirect.dependabot.com/actions/checkout/pull/284">Fix default branch resolution for .wiki and when using SSH</a></p>
<h2>v2.3.0</h2>
<p><a href="https://github-redirect.dependabot.com/actions/checkout/pull/278">Fallback to the default branch</a></p>
<h2>v2.2.0</h2>
<p><a href="https://github-redirect.dependabot.com/actions/checkout/pull/258">Fetch all history for all tags and branches when fetch-depth=0</a></p>
<h2>v2.1.1</h2>
<p>Changes to support GHES (<a href="https://github-redirect.dependabot.com/actions/checkout/pull/236">here</a> and <a href="https://github-redirect.dependabot.com/actions/checkout/pull/248">here</a>)</p>
<h2>v2.1.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/191">Group output</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/199">Changes to support GHES alpha release</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/184">Persist core.sshCommand for submodules</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/163">Add support ssh</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/179">Convert submodule SSH URL to HTTPS, when not using SSH</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/157">Add submodule support</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/144">Follow proxy settings</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/141">Fix ref for pr closed event when a pr is merged</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/128">Fix issue checking detached when git less than 2.22</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v2.3.1</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/284">Fix default branch resolution for .wiki and when using SSH</a></li>
</ul>
<h2>v2.3.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/278">Fallback to the default branch</a></li>
</ul>
<h2>v2.2.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/258">Fetch all history for all tags and branches when fetch-depth=0</a></li>
</ul>
<h2>v2.1.1</h2>
<ul>
<li>Changes to support GHES (<a href="https://github-redirect.dependabot.com/actions/checkout/pull/236">here</a> and <a href="https://github-redirect.dependabot.com/actions/checkout/pull/248">here</a>)</li>
</ul>
<h2>v2.1.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/191">Group output</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/199">Changes to support GHES alpha release</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/184">Persist core.sshCommand for submodules</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/163">Add support ssh</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/179">Convert submodule SSH URL to HTTPS, when not using SSH</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/157">Add submodule support</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/144">Follow proxy settings</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/141">Fix ref for pr closed event when a pr is merged</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/128">Fix issue checking detached when git less than 2.22</a></li>
</ul>
<h2>v2.0.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/108">Do not pass cred on command line</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/107">Add input persist-credentials</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/104">Fallback to REST API to download repo</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/actions/checkout/compare/v2...v2.3.4">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=2&new-version=2.3.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-16 16:43:28 +00:00
bors[bot]
da2f07cf5c
Merge #494
494: Bump actions/upload-release-asset from 1 to 1.0.2 r=thomaseizinger a=dependabot[bot]

Bumps [actions/upload-release-asset](https://github.com/actions/upload-release-asset) from 1 to 1.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/upload-release-asset/releases">actions/upload-release-asset's releases</a>.</em></p>
<blockquote>
<h2>Automate sliding major version number</h2>
<p>This is a minor update to make the current release have the latest code from master, and additionally allows for a new automation workflow to execute to automate the sliding of the major (v1, v2, v3, etc) version numbers for ease of referencing</p>
<h2>Fix upload asset logic</h2>
<p>This release patches a bug in the <code>upload-asset</code> logic that was preventing the asset from actually being uploaded properly.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/actions/upload-release-asset/compare/v1...v1.0.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-release-asset&package-manager=github_actions&previous-version=1&new-version=1.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-16 16:25:54 +00:00
dependabot[bot]
52d9a6e63e
Bump serde from 1.0.125 to 1.0.126
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.125 to 1.0.126.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.125...v1.0.126)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-16 10:45:29 +00:00
Daniel Karzel
1cdc23de32
Explicitly specify monero-wallet-rpc deamon port
In order to allow people to plug into public nodes / be more flexible with their own setup we now enforce specifying the monero daemon port to be used by the `monero-wallet-rpc`.
2021-05-14 09:50:52 +10:00
Daniel Karzel
343badbb4b
Remove duplication and cleanup
In the past we had problems with flags/parameter changes several times, where on instance was changed, buy another one was missed. This should mitigate this problem.
This patch introduces structs for all duplicated parameters and uses flatten to only have one point for changes.

Additionally removes all mentions of `alice` from the commands / variables. This code is on an application level and should not be concerned with swap protocol roles.
2021-05-14 09:50:50 +10:00
Daniel Karzel
4e1f3f82bd
Remove param from names
Did not add any value, more readable with just bitcoin and monero.
2021-05-14 09:50:49 +10:00
Daniel Karzel
657ac1e2e4
Bitcoin parameters that can be reused
Get rid of parameter duplication.
2021-05-14 09:50:47 +10:00
Daniel Karzel
a489564857
Remove unused Electrum HTTP default URL 2021-05-14 09:50:44 +10:00
bors[bot]
496ceab3cb
Merge #493
493: Add checks to max_giveable amount. r=da-kami a=bonomat

We need to check two things:
- balance to be higher than dust amount (546).
- balance to be higher than min-relay fee.

Additionally, the tx_builder might fail if not enough funds are in the wallet to pay for the overall transaction fees. In both cases, we return 0. 

fixes #487 

Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
2021-05-13 22:54:53 +00:00
Philipp Hoenisch
493545d07f
Improve logging for Swap Cli. 2021-05-12 16:31:32 +10:00
Philipp Hoenisch
4f45a26a83
Move check for max_giveable into the function. 2021-05-12 16:31:32 +10:00
Philipp Hoenisch
7fc5a47619
Add checks to max_giveable amount.
We need to check two things:
- balance to be higher than dust amount (546).
- balance to be higher than min-relay fee.

Additionally, the tx_builder might fail if not enough funds are in the wallet to pay for the overall transaction fees.
2021-05-12 16:31:32 +10:00
dependabot[bot]
840f6ab746
Bump sha2 from 0.9.4 to 0.9.5
Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.9.4...sha2-v0.9.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 06:09:19 +00:00
dependabot[bot]
5cc01570a2
Bump futures from 0.3.14 to 0.3.15
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.14 to 0.3.15.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.14...0.3.15)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 06:08:59 +00:00
dependabot[bot]
758d0f286e
Bump actions/checkout from 2 to 2.3.4
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 06:07:41 +00:00
dependabot[bot]
1705234b6e
Bump actions/upload-release-asset from 1 to 1.0.2
Bumps [actions/upload-release-asset](https://github.com/actions/upload-release-asset) from 1 to 1.0.2.
- [Release notes](https://github.com/actions/upload-release-asset/releases)
- [Commits](https://github.com/actions/upload-release-asset/compare/v1...v1.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 06:07:36 +00:00
bors[bot]
6bc21a9318
Merge #476 #477
476: Bump dprint/check from v1.3 to v1.4 r=thomaseizinger a=dependabot[bot]

Bumps [dprint/check](https://github.com/dprint/check) from v1.3 to v1.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dprint/check/releases">dprint/check's releases</a>.</em></p>
<blockquote>
<h2>v1.4</h2>
<p>Upgrade to dprint 0.13.1</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a3ed4347fe"><code>a3ed434</code></a> fix: Update to dprint 0.13.1</li>
<li>See full diff in <a href="https://github.com/dprint/check/compare/v1.3...a3ed4347fef5b3b2bf68cc38b44885d9df913253">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

477: Bump sha2 from 0.9.3 to 0.9.4 r=thomaseizinger a=dependabot[bot]

Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.9.3 to 0.9.4.
<details>
<summary>Commits</summary>
<ul>
<li><a href="c1ed4b1cbc"><code>c1ed4b1</code></a> sha2 v0.9.4 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/265">#265</a>)</li>
<li><a href="1bf768865d"><code>1bf7688</code></a> sha-1 v0.9.5 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/264">#264</a>)</li>
<li><a href="bf761edb53"><code>bf761ed</code></a> sha1+sha2: switch from <code>cpuid-bool</code> to <code>cpufeatures</code> (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/263">#263</a>)</li>
<li><a href="1e775edda2"><code>1e775ed</code></a> sha2: bump <code>sha2-asm</code> to v0.6.1 release (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/262">#262</a>)</li>
<li><a href="e8b3abe442"><code>e8b3abe</code></a> feat(sha2): use latest sha2-asm and enable M1 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/261">#261</a>)</li>
<li><a href="ee361ed25f"><code>ee361ed</code></a> build(deps): bump libc from 0.2.88 to 0.2.93 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/254">#254</a>)</li>
<li><a href="0bf77b52b1"><code>0bf77b5</code></a> build(deps): bump byteorder from 1.4.2 to 1.4.3 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/245">#245</a>)</li>
<li><a href="dd9086ad8c"><code>dd9086a</code></a> sha1: add multiplatform tests (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/252">#252</a>)</li>
<li><a href="1c1182c8b8"><code>1c1182c</code></a> rustfmt (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/253">#253</a>)</li>
<li><a href="ad19dffcbe"><code>ad19dff</code></a> build(deps): bump libc from 0.2.86 to 0.2.88 (<a href="https://github-redirect.dependabot.com/RustCrypto/hashes/issues/244">#244</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/RustCrypto/hashes/compare/sha2-v0.9.3...sha2-v0.9.4">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sha2&package-manager=cargo&previous-version=0.9.3&new-version=0.9.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 22:11:21 +00:00
bors[bot]
a948ccb51b
Merge #483
483: Bump url from 2.2.1 to 2.2.2 r=thomaseizinger a=dependabot[bot]

Bumps [url](https://github.com/servo/rust-url) from 2.2.1 to 2.2.2.
<details>
<summary>Commits</summary>
<ul>
<li><a href="6c22912c31"><code>6c22912</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/servo/rust-url/issues/709">#709</a> from BramBonne/bump-version</li>
<li><a href="0707a58b91"><code>0707a58</code></a> Bump minor version number</li>
<li><a href="991e438ff1"><code>991e438</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/servo/rust-url/issues/708">#708</a> from BramBonne/test-syntax-violations</li>
<li><a href="744b76332c"><code>744b763</code></a> Remove stray comma</li>
<li><a href="5793b7ef14"><code>5793b7e</code></a> Check parsing result in SyntaxViolation test</li>
<li><a href="0659871a26"><code>0659871</code></a> Add tests for SyntaxViolation callback types</li>
<li><a href="c6f60fe5ff"><code>c6f60fe</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/servo/rust-url/issues/668">#668</a> from sdroege/make-relative</li>
<li><a href="d51cec4803"><code>d51cec4</code></a> Add Url::make_relative() as the inverse of Url::join()</li>
<li><a href="77fb472619"><code>77fb472</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/servo/rust-url/issues/703">#703</a> from BramBonne/slicing-tests</li>
<li><a href="ea2342e182"><code>ea2342e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/servo/rust-url/issues/705">#705</a> from BramBonne/test-quirks</li>
<li>Additional commits viewable in <a href="https://github.com/servo/rust-url/compare/v2.2.1...v2.2.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=url&package-manager=cargo&previous-version=2.2.1&new-version=2.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 21:52:35 +00:00
dependabot[bot]
2c31536311
Bump url from 2.2.1 to 2.2.2
Bumps [url](https://github.com/servo/rust-url) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.2.1...v2.2.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 06:49:11 +00:00
bors[bot]
f03e8fa5af
Merge #474
474: Add more log details r=bonomat a=bonomat

Resolves #448 

1. The first commit adds an additional log statement of the exchange rate for each state-update. This is useful because it allows us to measure profitability easily, i.e. by knowing what was the exchange rate when the swap was started and what was it when it was finalized.
2. The second commit changes a bunch of log messages. 
3. The third commit is adds a new commandline flag to toggle json format.




Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
Co-authored-by: Philipp Hoenisch <philipp@coblox.tech>
2021-05-11 06:31:32 +00:00
Philipp Hoenisch
26e0383e17
Apply suggestions from code review
Co-authored-by: Daniel Karzel <daniel.karzel@coblox.tech>
2021-05-11 16:06:44 +10:00
Philipp Hoenisch
fc0cceb180
Toggle json logs using commandline flag. 2021-05-11 15:28:25 +10:00
Philipp Hoenisch
316f95c65b
Always log whole causality chain for errors. 2021-05-11 15:27:53 +10:00
Philipp Hoenisch
c011e95062
Improve logging by adding details as fields instead of into the msg. 2021-05-11 15:27:53 +10:00
Philipp Hoenisch
1706b36800
Log exchange rate at each state. 2021-05-11 15:27:49 +10:00
bors[bot]
227c383d76
Merge #481
481: Min buy amount r=da-kami a=da-kami



Co-authored-by: Daniel Karzel <daniel@comit.network>
2021-05-11 04:08:59 +00:00
bors[bot]
af2938a39a
Merge #485
485: Update assert_weight test to account for a range up to 8 bytes. r=bonomat a=bonomat

Fixes #482 

Weights fluctuate because of the length of the signatures. Valid ecdsa signatures can have 68, 69, 70, 71, or 72 bytes. Since most of our transactions have 2 signatures the weight can be up to 8 bytes less than the static weight (4 bytes per signature). 
Since it is really hard to get these short signatures (<1 in 100), I also include the transaction in the assert message which will help for debugging purposes. 

Source: https://medium.com/coinmonks/on-bitcoin-transaction-sizes-97e31bc9d816

Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
2021-05-11 02:56:30 +00:00
Daniel Karzel
652aae9590
Introduce a minimum buy amount
Introduces a minimum buy Bitcoin amount similar to the maximum amount already present.
For the CLI the minimum amount is enforced by waiting until at least the minimum is available as max-giveable amount.
2021-05-11 12:03:02 +10:00
Daniel Karzel
6d3cf0af91
Include too low balance into Alice's error 2021-05-11 12:03:02 +10:00
Daniel Karzel
1d62f4916c
Move max_buy and ask_spread into config
Max-buy and spread is not something that one would configure on every run.
More convenient to keep this in the config.

The max-buy Bitcoin value was adapted to `0.02` which is more reasonable for mainnet.
Activated feature `serde-float` to serialize the spread (Decimal) as float instead of string.

```
...

[maker]
max_buy_btc = 0.02
ask_spread = 0.02
```
2021-05-11 12:02:57 +10:00
Philipp Hoenisch
330269a1e9
Update assert_weight test to account for a range up to 8 bytes.
Weights fluctuate because of the length of the signatures. Valid ecdsa signatures can have 68, 69, 70, 71, or 72 bytes. Since most of our transactions have 2 signatures the weight can be up to 8 bytes less than the static weight (4 bytes per signature).
2021-05-11 10:50:24 +10:00
Daniel Karzel
538b25a6dd
Only create config-directory on init success
We should only create the file if the user finished the initial setup correctly.
2021-05-11 10:32:25 +10:00
bors[bot]
d96e20a5b0
Merge #479
479: Use rust_decimal in estimate_fee function. r=bonomat a=bonomat

Follow-up PR from #466 

Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
2021-05-10 23:00:12 +00:00