mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-07-29 11:31:22 +00:00
Fixed bug with sequence
This commit is contained in:
@@ -195,15 +195,19 @@ impl TransparentInputs {
|
||||
// _ => return Err(Error::InvalidAddress),
|
||||
// }
|
||||
|
||||
mtx.vin.push(TxIn::new(utxo));
|
||||
self.inputs.push(TransparentInputInfo { sk, pubkey, coin, secret, redeem_script });
|
||||
let txin = TxIn::new(utxo);
|
||||
|
||||
// Set lock time if present
|
||||
if (lock_time > 0) {
|
||||
mtx.sequence = 4294967294; // max value (0xFFFFFFFF - 1), so lockTime can be used but not RBF
|
||||
mtx.lock_time = lock_time;
|
||||
|
||||
// Also set sequence
|
||||
txin.sequence = std::u32::MAX - 1; // max value (0xFFFFFFFF - 1), so lockTime can be used but not RBF
|
||||
}
|
||||
|
||||
mtx.vin.push(txin);
|
||||
self.inputs.push(TransparentInputInfo { sk, pubkey, coin, secret, redeem_script });
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user