From 6b95593e7ff074832747e930a7cbba5b3f640f7c Mon Sep 17 00:00:00 2001 From: antiochp <30642645+antiochp@users.noreply.github.com> Date: Tue, 4 Jun 2019 13:56:52 +0100 Subject: [PATCH] make sure we only set lock_height if >0 --- libwallet/src/internal/selection.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libwallet/src/internal/selection.rs b/libwallet/src/internal/selection.rs index d4793cb..1fa89b1 100644 --- a/libwallet/src/internal/selection.rs +++ b/libwallet/src/internal/selection.rs @@ -286,9 +286,10 @@ where let (mut parts, change_amounts_derivations) = inputs_and_change(&coins, wallet, keychain_mask, amount, fee, change_outputs)?; - // This is more proof of concept than anything but here we set lock_height - // on tx being sent (based on current chain height via api). - parts.push(build::with_lock_height(lock_height)); + // Build a "Plain" kernel unless lock_height>0 explicitly specified. + if lock_height > 0 { + parts.push(build::with_lock_height(lock_height)); + } Ok((parts, coins, change_amounts_derivations, fee)) }