make sure we only set lock_height if >0

This commit is contained in:
antiochp 2019-06-04 13:56:52 +01:00
parent 6c322acaf8
commit 6b95593e7f
No known key found for this signature in database
GPG key ID: 49CBDBCE8AB061C1

View file

@ -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).
// 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))
}