mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-08-02 00:31:32 +00:00
Declare is_refund as an array, for easier compatibility with existing Script setters.
This commit is contained in:
@@ -249,12 +249,12 @@ impl TransparentInputs {
|
|||||||
sig_bytes.extend(&[SIGHASH_ALL as u8]);
|
sig_bytes.extend(&[SIGHASH_ALL as u8]);
|
||||||
|
|
||||||
if (!&info.secret.is_empty()) { // Redeem
|
if (!&info.secret.is_empty()) { // Redeem
|
||||||
let is_refund : u8 = 0;
|
let is_refund : [u8;1] = [0];
|
||||||
mtx.vin[i].script_sig = Script::default() << &sig_bytes[..] << &info.pubkey[..] << &info.secret[..] << is_refund << &info.redeem_script[..];
|
mtx.vin[i].script_sig = Script::default() << &sig_bytes[..] << &info.pubkey[..] << &info.secret[..] << &is_refund[..] << &info.redeem_script[..];
|
||||||
}
|
}
|
||||||
else { // Refund
|
else { // Refund
|
||||||
let is_refund : u8 = 1;
|
let is_refund : [u8;1] = [1];
|
||||||
mtx.vin[i].script_sig = Script::default() << &sig_bytes[..] << &info.pubkey[..] << is_refund << &info.redeem_script[..];
|
mtx.vin[i].script_sig = Script::default() << &sig_bytes[..] << &info.pubkey[..] << &is_refund[..] << &info.redeem_script[..];
|
||||||
}
|
}
|
||||||
|
|
||||||
// No longer supports P2PKH scriptSig since this is a P2SH-only implementation
|
// No longer supports P2PKH scriptSig since this is a P2SH-only implementation
|
||||||
|
Reference in New Issue
Block a user