Skip to content

Commit

Permalink
Calculate exact miner fee for hash/timelock spends
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-belcher committed Feb 3, 2022
1 parent 956eb81 commit e033828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wallet_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ impl IncomingSwapCoin {
&self,
destination_address: &Address,
) -> Transaction {
let miner_fee = 200; //TODO do this calculation properly
let miner_fee = 136 * 10; //126 vbytes x 10 sat/vb, size calculated using testmempoolaccept
let mut tx = Transaction {
input: vec![TxIn {
previous_output: OutPoint {
Expand Down Expand Up @@ -346,7 +346,7 @@ impl OutgoingSwapCoin {
}

pub fn create_timelock_spend(&self, destination_address: &Address) -> Transaction {
let miner_fee = 200; //TODO do this calculation properly
let miner_fee = 128 * 1; //128 vbytes x 1 sat/vb, size calculated using testmempoolaccept
let mut tx = Transaction {
input: vec![TxIn {
previous_output: OutPoint {
Expand Down

0 comments on commit e033828

Please sign in to comment.