Upgrade toolchain

Needed to use libp2p-async-await
This commit is contained in:
Franck Royer 2021-02-03 16:20:59 +11:00
parent e82383bcf6
commit c316ea5244
No known key found for this signature in database
GPG key ID: A82ED75A8DFC50A4
15 changed files with 31 additions and 43 deletions

View file

@ -157,8 +157,7 @@ impl TransactionBlockHeight for Wallet {
.await
.map_err(|_| backoff::Error::Transient(Error::Io))?;
let block_height =
block_height.ok_or_else(|| backoff::Error::Transient(Error::NotYetMined))?;
let block_height = block_height.ok_or(backoff::Error::Transient(Error::NotYetMined))?;
Result::<_, backoff::Error<Error>>::Ok(block_height)
})

View file

@ -17,7 +17,7 @@ impl Seed {
Ok(Seed(seed::Seed::random()?))
}
pub fn from_file_or_generate(data_dir: &PathBuf) -> Result<Self, Error> {
pub fn from_file_or_generate(data_dir: &Path) -> Result<Self, Error> {
let file_path_buf = data_dir.join("seed.pem");
let file_path = Path::new(&file_path_buf);

View file

@ -247,9 +247,7 @@ async fn run_until_internal(
.await;
match publishded_redeem_tx {
Ok(_) => {
AliceState::BtcRedeemed
}
Ok(_) => AliceState::BtcRedeemed,
Err(e) => {
bail!("Waiting for Bitcoin transaction finality failed with {}! The redeem transaction was published, but it is not ensured that the transaction was included! You're screwed.", e)
}