Skip to content

Commit

Permalink
additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cgorenflo committed Sep 11, 2024
1 parent f1e4b4e commit a74a1b4
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ampd/src/broadcaster/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,10 @@ where

async fn broadcast(&mut self, msgs: Vec<Any>) -> Result<TxResponse, Error> {
let (acc_number, acc_sequence) = self.acc_number_and_sequence().await?;
let fee = self.estimate_fee(msgs.clone(), acc_sequence).await?;
let tx = Tx::builder()
.msgs(msgs.clone())
.fee(self.estimate_fee(msgs, acc_sequence).await?)
.msgs(msgs)
.fee(fee.clone())
.pub_key(self.pub_key.1)
.acc_sequence(acc_sequence)
.build()
Expand Down Expand Up @@ -256,7 +257,14 @@ where
txhash: tx_hash, ..
} = &response;

info!(tx_hash, "broadcasted transaction");
info!(
tx_hash,
acc_number,
acc_sequence = self.acc_sequence,
fee = format!("{:?}", fee.amount),
gas = format!("{:?}", fee.gas_limit),
"broadcasted transaction"
);

self.acc_sequence.replace(
acc_sequence
Expand Down

0 comments on commit a74a1b4

Please sign in to comment.