Skip to content

Commit

Permalink
CLEANUP: add fee support
Browse files Browse the repository at this point in the history
Hooks up the plumping for fees in Galileo, but doesn't consume any of
the neat CLI args: it's just hardcoding low fees.
  • Loading branch information
conorsch committed Jun 4, 2024
1 parent 8569029 commit 9ff56df
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use penumbra_proto::view::v1::broadcast_transaction_response::Status as Broadcas
use penumbra_asset::Value;
use penumbra_custody::{AuthorizeRequest, CustodyClient};
use penumbra_fee::FeeTier;
use penumbra_fee::GasPrices;
use penumbra_keys::{Address, FullViewingKey};
use penumbra_txhash::TransactionId;
use penumbra_view::ViewClient;
Expand Down Expand Up @@ -74,7 +75,14 @@ where

let mut planner = Planner::new(OsRng);

// Hardcode low fees to unbreak txs.
// Here we hardcode low fees. It'd be nice to override via CLI arg.
// Look up GasPrices, because merely calling `set_fee_tier` is not sufficient.
let gp: GasPrices = self2
.view
.gas_prices()
.await
.expect("failed to look up GasPrices");
planner.set_gas_prices(gp);
planner.set_fee_tier(FeeTier::Low);

for value in values {
Expand Down

0 comments on commit 9ff56df

Please sign in to comment.