691: Bump time from 0.2.27 to 0.3.2 r=thomaseizinger a=dependabot[bot]

Bumps [time](https://github.com/time-rs/time) from 0.2.27 to 0.3.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">time's changelog</a>.</em></p>
<blockquote>
<h2>0.3.2 [2021-08-25]</h2>
<h3>Added</h3>
<ul>
<li><code>Instant</code> is now <code>#[repr(transparent)]</code></li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Constructing a <code>Date</code> from its ISO year, week, and weekday now returns the correct value in all
circumstances. Previously, dates with an ISO year less than zero may have returned incorrect
values. This affects both the <code>Date::from_iso_week_date</code> method and the <code>date!</code> macro.</li>
</ul>
<h2>0.3.1 [2021-08-06]</h2>
<h3>Added</h3>
<ul>
<li><code>Month</code> now implements <code>TryFrom&lt;u8&gt;</code></li>
<li><code>From&lt;Month&gt;</code> is now implemented for <code>u8</code></li>
<li>The parser now accepts &quot;5 PM&quot; and similar as a valid time. Only the 12-hour clock hour and the
AM/PM suffix may be present; any other components representing a time will cause an error (this
exact behavior is not guaranteed).</li>
<li>The <code>time!</code> macro accepts the &quot;5 PM&quot; syntax with the same restriction.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Macros that have a time component (<code>time!</code> and <code>datetime!</code>) no longer accept &quot;0:00 AM&quot; and
similar. This was previously erroneously accepted.</li>
</ul>
<h2>0.3.0 [2021-07-30]</h2>
<h3>Added</h3>
<ul>
<li><code>datetime!</code> macro, which allows the construction of a statically verified <code>PrimitiveDateTime</code> or
<code>OffsetDateTime</code>.</li>
<li><code>PrimitiveDateTime::replace_time</code></li>
<li><code>PrimitiveDateTime::replace_date</code></li>
<li><code>OffsetDateTime::replace_time</code></li>
<li><code>OffsetDateTime::replace_date</code></li>
<li><code>OffsetDateTime::replace_date_time</code></li>
<li><code>OffsetDateTime::replace_offset</code></li>
<li><code>#![no_alloc]</code> support</li>
<li><code>Date::to_iso_week_date</code>, replacing <code>Date::iso_year_week</code></li>
<li><code>Date::MIN</code></li>
<li><code>Date::MAX</code></li>
<li><code>UtcOffset::from_hms</code></li>
<li><code>UtcOffset::from_whole_seconds</code></li>
<li><code>UtcOffset::as_hms</code></li>
<li><code>UtcOffset::whole_hours</code></li>
<li><code>UtcOffset::whole_minutes</code></li>
<li><code>UtcOffset::minutes_past_hour</code></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="4020fd632f"><code>4020fd6</code></a> v0.3.2 release</li>
<li><a href="ffb028e4d6"><code>ffb028e</code></a> Fix constructing dates with negative ISO year</li>
<li><a href="635ef21646"><code>635ef21</code></a> Add additional roundtrip tests</li>
<li><a href="fefc8c765e"><code>fefc8c7</code></a> Warn on future deprecations</li>
<li><a href="a83996974f"><code>a839969</code></a> Use <code>cargo-criterion</code> for benchmarks</li>
<li><a href="6117ab74a2"><code>6117ab7</code></a> Pin trybuild</li>
<li><a href="12673bfd18"><code>12673bf</code></a> Make <code>Instant</code> <code>#[repr(transparent)]</code></li>
<li><a href="e52e355689"><code>e52e355</code></a> Use more consistent measure for benchmarks</li>
<li><a href="102437e1d0"><code>102437e</code></a> Update CI for trybuild</li>
<li><a href="656f7d98ce"><code>656f7d9</code></a> Move to trybuild</li>
<li>Additional commits viewable in <a href="https://github.com/time-rs/time/compare/v0.2.27...v0.3.2">compare view</a></li>
</ul>
</details>
<br />


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

You can trigger a rebase of this PR 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>
pull/734/head
bors[bot] 3 years ago committed by GitHub
commit 3db96dd170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

117
Cargo.lock generated

@ -183,12 +183,6 @@ dependencies = [
"tokio",
]
[[package]]
name = "base-x"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b"
[[package]]
name = "base32"
version = "0.4.0"
@ -681,12 +675,6 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "const_fn"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28b9d6de7f49e22cf97ad17fc4036ece69300032f45f78f30b4a4482cdc3f4a6"
[[package]]
name = "core-foundation"
version = "0.9.1"
@ -984,12 +972,6 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "discard"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
[[package]]
name = "ecdsa_fun"
version = "0.6.2-alpha.0"
@ -3762,12 +3744,6 @@ dependencies = [
"opaque-debug 0.3.0",
]
[[package]]
name = "sha1"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
[[package]]
name = "sha2"
version = "0.8.2"
@ -3974,70 +3950,12 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
[[package]]
name = "standback"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2beb4d1860a61f571530b3f855a1b538d0200f7871c63331ecd6f17b1f014f8"
dependencies = [
"version_check 0.9.3",
]
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "stdweb"
version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5"
dependencies = [
"discard",
"rustc_version 0.2.3",
"stdweb-derive",
"stdweb-internal-macros",
"stdweb-internal-runtime",
"wasm-bindgen",
]
[[package]]
name = "stdweb-derive"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef"
dependencies = [
"proc-macro2 1.0.27",
"quote 1.0.9",
"serde",
"serde_derive",
"syn 1.0.73",
]
[[package]]
name = "stdweb-internal-macros"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11"
dependencies = [
"base-x",
"proc-macro2 1.0.27",
"quote 1.0.9",
"serde",
"serde_derive",
"serde_json",
"sha1",
"syn 1.0.73",
]
[[package]]
name = "stdweb-internal-runtime"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0"
[[package]]
name = "strsim"
version = "0.8.0"
@ -4169,7 +4087,7 @@ dependencies = [
"tempfile",
"testcontainers 0.12.0",
"thiserror",
"time 0.2.27",
"time 0.3.2",
"tokio",
"tokio-socks",
"tokio-tar",
@ -4327,40 +4245,11 @@ dependencies = [
[[package]]
name = "time"
version = "0.2.27"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242"
checksum = "3e0a10c9a9fb3a5dce8c2239ed670f1a2569fcf42da035f5face1b19860d52b0"
dependencies = [
"const_fn",
"libc",
"standback",
"stdweb",
"time-macros",
"version_check 0.9.3",
"winapi 0.3.9",
]
[[package]]
name = "time-macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1"
dependencies = [
"proc-macro-hack",
"time-macros-impl",
]
[[package]]
name = "time-macros-impl"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa"
dependencies = [
"proc-macro-hack",
"proc-macro2 1.0.27",
"quote 1.0.9",
"standback",
"syn 1.0.73",
]
[[package]]

@ -52,7 +52,7 @@ sled = "0.34"
structopt = "0.3"
strum = { version = "0.21", features = [ "derive" ] }
thiserror = "1"
time = "0.2"
time = "0.3"
tokio = { version = "1", features = [ "rt-multi-thread", "time", "macros", "sync", "process", "fs", "net" ] }
tokio-socks = "0.5"
tokio-tungstenite = { version = "0.15", features = [ "rustls-tls" ] }

@ -2,7 +2,7 @@ use crate::asb;
use crate::bitcoin::{CancelTimelock, PunishTimelock};
use std::cmp::max;
use std::time::Duration;
use time::NumericalStdDurationShort;
use time::ext::NumericalStdDuration;
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct Config {
@ -44,14 +44,14 @@ pub struct Regtest;
impl GetConfig for Mainnet {
fn get_config() -> Config {
Config {
bitcoin_lock_mempool_timeout: 3.minutes(),
bitcoin_lock_confirmed_timeout: 2.hours(),
bitcoin_lock_mempool_timeout: 3.std_minutes(),
bitcoin_lock_confirmed_timeout: 2.std_hours(),
bitcoin_finality_confirmations: 2,
bitcoin_avg_block_time: 10.minutes(),
bitcoin_avg_block_time: 10.std_minutes(),
bitcoin_cancel_timelock: CancelTimelock::new(72),
bitcoin_punish_timelock: PunishTimelock::new(72),
bitcoin_network: bitcoin::Network::Bitcoin,
monero_avg_block_time: 2.minutes(),
monero_avg_block_time: 2.std_minutes(),
monero_finality_confirmations: 10,
monero_network: monero::Network::Mainnet,
}
@ -61,14 +61,14 @@ impl GetConfig for Mainnet {
impl GetConfig for Testnet {
fn get_config() -> Config {
Config {
bitcoin_lock_mempool_timeout: 3.minutes(),
bitcoin_lock_confirmed_timeout: 1.hours(),
bitcoin_lock_mempool_timeout: 3.std_minutes(),
bitcoin_lock_confirmed_timeout: 1.std_hours(),
bitcoin_finality_confirmations: 2,
bitcoin_avg_block_time: 10.minutes(),
bitcoin_avg_block_time: 10.std_minutes(),
bitcoin_cancel_timelock: CancelTimelock::new(12),
bitcoin_punish_timelock: PunishTimelock::new(6),
bitcoin_network: bitcoin::Network::Testnet,
monero_avg_block_time: 2.minutes(),
monero_avg_block_time: 2.std_minutes(),
monero_finality_confirmations: 10,
monero_network: monero::Network::Stagenet,
}
@ -78,14 +78,14 @@ impl GetConfig for Testnet {
impl GetConfig for Regtest {
fn get_config() -> Config {
Config {
bitcoin_lock_mempool_timeout: 30.seconds(),
bitcoin_lock_confirmed_timeout: 1.minutes(),
bitcoin_lock_mempool_timeout: 30.std_seconds(),
bitcoin_lock_confirmed_timeout: 1.std_minutes(),
bitcoin_finality_confirmations: 1,
bitcoin_avg_block_time: 5.seconds(),
bitcoin_avg_block_time: 5.std_seconds(),
bitcoin_cancel_timelock: CancelTimelock::new(100),
bitcoin_punish_timelock: PunishTimelock::new(50),
bitcoin_network: bitcoin::Network::Regtest,
monero_avg_block_time: 1.seconds(),
monero_avg_block_time: 1.std_seconds(),
monero_finality_confirmations: 10,
monero_network: monero::Network::Mainnet, // yes this is strange
}

Loading…
Cancel
Save