mirror of
https://github.com/mimblewimble/grin-wallet.git
synced 2025-02-08 12:21:10 +03:00
make sure we only set lock_height if >0
This commit is contained in:
parent
6c322acaf8
commit
6b95593e7f
1 changed files with 4 additions and 3 deletions
|
@ -286,9 +286,10 @@ where
|
||||||
let (mut parts, change_amounts_derivations) =
|
let (mut parts, change_amounts_derivations) =
|
||||||
inputs_and_change(&coins, wallet, keychain_mask, amount, fee, change_outputs)?;
|
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
|
// Build a "Plain" kernel unless lock_height>0 explicitly specified.
|
||||||
// on tx being sent (based on current chain height via api).
|
if lock_height > 0 {
|
||||||
parts.push(build::with_lock_height(lock_height));
|
parts.push(build::with_lock_height(lock_height));
|
||||||
|
}
|
||||||
|
|
||||||
Ok((parts, coins, change_amounts_derivations, fee))
|
Ok((parts, coins, change_amounts_derivations, fee))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue