Switch on leadbyte instead of tx height when decrypting outputs
This commit is contained in:
parent
c3d89644e2
commit
878646855c
|
@ -362,11 +362,11 @@ fn parse_note_plaintext_without_memo<P: consensus::Parameters>(
|
|||
let mut r = [0u8; 32];
|
||||
r.copy_from_slice(&plaintext[20..COMPACT_NOTE_SIZE]);
|
||||
|
||||
let rseed = if P::is_nu_active(NetworkUpgrade::Canopy, height) {
|
||||
Rseed::AfterZip212(r)
|
||||
} else {
|
||||
let rseed = if plaintext[0] == 0x01 {
|
||||
let rcm = Fs::from_repr(FsRepr(r.try_into().expect("slice is the correct length")))?;
|
||||
Rseed::BeforeZip212(rcm)
|
||||
} else {
|
||||
Rseed::AfterZip212(r)
|
||||
};
|
||||
|
||||
let diversifier = Diversifier(d);
|
||||
|
@ -553,11 +553,11 @@ pub fn try_sapling_output_recovery<P: consensus::Parameters>(
|
|||
let mut r = [0u8; 32];
|
||||
r.copy_from_slice(&plaintext[20..COMPACT_NOTE_SIZE]);
|
||||
|
||||
let rseed = if P::is_nu_active(NetworkUpgrade::Canopy, height) {
|
||||
Rseed::AfterZip212(r)
|
||||
} else {
|
||||
let rseed = if plaintext[0] == 0x01 {
|
||||
let rcm = Fs::from_repr(FsRepr(r.try_into().expect("slice is the correct length")))?;
|
||||
Rseed::BeforeZip212(rcm)
|
||||
} else {
|
||||
Rseed::AfterZip212(r)
|
||||
};
|
||||
|
||||
let mut memo = [0u8; 512];
|
||||
|
|
Loading…
Reference in New Issue