Skip to content

Commit

Permalink
Hot fix setting the tx lock_time in p2sh_spending_tx #852
Browse files Browse the repository at this point in the history
  • Loading branch information
artemii235 committed Mar 15, 2021
1 parent 952210c commit 3ee3120
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mm2src/coins/utxo/utxo_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,12 @@ pub fn p2sh_spending_tx(
sequence: u32,
lock_time: u32,
) -> Result<UtxoTx, String> {
let lock_time_by_now = if coin.conf.ticker == "KMD" {
(now_ms() / 1000) as u32 - 3600 + 2 * 777
} else {
(now_ms() / 1000) as u32 - 3600
};
let lock_time = lock_time_by_now.max(lock_time);
let n_time = if coin.conf.is_pos {
Some((now_ms() / 1000) as u32)
} else {
Expand Down

0 comments on commit 3ee3120

Please sign in to comment.