port to hush

This commit is contained in:
DenioD
2019-10-18 09:45:35 +02:00
parent cead0062bd
commit e7d272ce42
10 changed files with 86 additions and 86 deletions

View File

@@ -24,7 +24,7 @@ impl From<TransparentAddress> for RecipientAddress {
}
impl RecipientAddress {
pub fn from_str(s: &str, hrp_sapling_address: &str, b58_pubkey_address: [u8; 2], b58_script_address: [u8; 2]) -> Option<Self> {
pub fn from_str(s: &str, hrp_sapling_address: &str, b58_pubkey_address: [u8; 1], b58_script_address: [u8; 1]) -> Option<Self> {
// Try to match a sapling z address
if let Some(pa) = match decode_payment_address(hrp_sapling_address, s) {
Ok(ret) => ret,

View File

@@ -267,7 +267,7 @@ impl Utxo {
let mut address_bytes = vec![0; address_len as usize];
reader.read_exact(&mut address_bytes)?;
let address = String::from_utf8(address_bytes).unwrap();
assert_eq!(address.chars().take(1).collect::<Vec<char>>()[0], 't');
assert_eq!(address.chars().take(1).collect::<Vec<char>>()[0], 'R');
let mut txid_bytes = [0; 32];
reader.read_exact(&mut txid_bytes)?;