mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-02-07 06:44:11 +00:00
Use 0x51 (OP_TRUE) instead of 0x01 to denote that it is a refund
This commit is contained in:
parent
f48cdf9484
commit
1ce584f986
@ -249,11 +249,11 @@ 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;1] = [0];
|
let is_refund : [u8;1] = [0]; // 0x00 (OP_FALSE)
|
||||||
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] = [1];
|
let is_refund : [u8;1] = [81]; // 0x51 (OP_TRUE)
|
||||||
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[..];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user