Skip to content

Commit

Permalink
fix: add testnet 75 compat
Browse files Browse the repository at this point in the history
The changes here are mostly related to upstream changes in
penumbra-zone/penumbra#4285.
  • Loading branch information
conorsch committed May 10, 2024
1 parent 04e8588 commit 6c71686
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
10 changes: 5 additions & 5 deletions src/responder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ where
tracing::info!("processing send request, waiting for readiness");
});

let req = (*addr, values.clone());
let req = (*addr.clone(), values.clone());
reqs.push(req);
sent_addresses.push(*addr);
sent_addresses.push(addr.clone());

span.in_scope(|| {
tracing::info!("submitted send request");
Expand All @@ -185,21 +185,21 @@ where
// Run the tasks concurrently.
let mut i = 0;
while let Some(result) = responses.next().await {
let addr = sent_addresses[i];
let addr = &sent_addresses[i];
match result {
Ok(id) => {
// Reply to the originating message with the address
let span = tracing::info_span!("send", address = %addr);
span.in_scope(|| {
tracing::info!(id = %id, "send request succeeded");
});
succeeded.push((addr, id));
succeeded.push((*addr.clone(), id));
}
// By default, anyhow::Error's Display impl only prints the outermost error;
// using the alternate formate specifier prints the entire chain of causes.
Err(e) => {
tracing::error!(?addr, ?e, "Failed to send funds");
failed.push((addr, format!("{:#}", e)))
failed.push((*addr.clone(), format!("{:#}", e)))
}
}

Expand Down
13 changes: 2 additions & 11 deletions src/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use penumbra_proto::view::v1::broadcast_transaction_response::Status as Broadcas
use penumbra_asset::Value;
use penumbra_custody::{AuthorizeRequest, CustodyClient};
use penumbra_keys::{Address, FullViewingKey};
use penumbra_transaction::memo::MemoPlaintext;
use penumbra_txhash::TransactionId;
use penumbra_view::ViewClient;
use penumbra_wallet::plan::Planner;
Expand Down Expand Up @@ -73,17 +72,9 @@ where
}
let mut planner = Planner::new(OsRng);
for value in values {
planner.output(value, address);
planner.output(value, address.clone());
}
planner
.memo(
MemoPlaintext::new(
self2.fvk.payment_address(0.into()).0,
"Hello from Galileo, the Penumbra faucet bot".to_string(),
)
.expect("can create memo"),
)
.unwrap();
planner.memo("Hello from Galileo, the Penumbra faucet bot".to_string());
let plan = planner.plan(&mut self2.view, self2.account.into()).await?;

// 2. Authorize and build the transaction.
Expand Down

0 comments on commit 6c71686

Please sign in to comment.