mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-29 12:06:35 -05:00
Tidy up log messages across the codebase
1. Clearly separate the log messages from any fields that are captured. The log message itself should be meaningful because it depends on the underlying formatter, how/if the fields are displayed. 2. Some log messages had very little context, expand that. 3. Wording of errors was inconsistent, hopefully all errors should now start with `Failed to ...`. 4. Some log messages were duplicated across multiple layers (like opening the database). 5. Some log messages were split into two where one part is now an `error!` and the 2nd part is an `info!` on what is happening next. 6. Where appropriate, punctuation has been removed to not interrupt the reader's flow.
This commit is contained in:
parent
78480547d5
commit
9119ce5cc4
13 changed files with 79 additions and 74 deletions
|
|
@ -151,14 +151,14 @@ impl TxLock {
|
|||
witness: Vec::new(),
|
||||
};
|
||||
|
||||
let spending_fee = spending_fee.as_sat();
|
||||
tracing::debug!(%spending_fee, "Redeem tx fee");
|
||||
let fee = spending_fee.as_sat();
|
||||
let tx_out = TxOut {
|
||||
value: self.inner.clone().extract_tx().output[self.lock_output_vout()].value
|
||||
- spending_fee,
|
||||
value: self.inner.clone().extract_tx().output[self.lock_output_vout()].value - fee,
|
||||
script_pubkey: spend_address.script_pubkey(),
|
||||
};
|
||||
|
||||
tracing::debug!(%fee, "Constructed Bitcoin spending transaction");
|
||||
|
||||
Transaction {
|
||||
version: 2,
|
||||
lock_time: 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue