This commit is contained in:
Kris Nuttycombe 2020-09-18 10:52:58 -06:00
parent 80e1d35ea6
commit cfb6850d7c
3 changed files with 6 additions and 17 deletions

View File

@ -4,11 +4,7 @@ use zcash_client_backend::encoding::{
decode_payment_address, decode_transparent_address, encode_payment_address,
encode_transparent_address,
};
use zcash_primitives::{
consensus,
legacy::TransparentAddress,
primitives::PaymentAddress,
};
use zcash_primitives::{consensus, legacy::TransparentAddress, primitives::PaymentAddress};
/// An address that funds can be sent to.
pub enum RecipientAddress {

View File

@ -4,11 +4,7 @@ use rusqlite::{types::ToSql, Connection, NO_PARAMS};
use std::path::Path;
use zcash_client_backend::encoding::encode_extended_full_viewing_key;
use zcash_primitives::{
block::BlockHash,
consensus,
zip32::ExtendedFullViewingKey,
};
use zcash_primitives::{block::BlockHash, consensus, zip32::ExtendedFullViewingKey};
use crate::{
address_from_extfvk,
@ -259,10 +255,7 @@ mod tests {
};
use super::{init_accounts_table, init_blocks_table, init_data_database};
use crate::{
query::get_address,
tests,
};
use crate::{query::get_address, tests};
#[test]
fn init_accounts_table_only_works_once() {

View File

@ -127,7 +127,7 @@ pub trait Parameters: Clone {
/// if an activation height has been set.
fn activation_height(&self, nu: NetworkUpgrade) -> Option<BlockHeight>;
/// Returns the human-readable prefix for Sapling extended full
/// Returns the human-readable prefix for Sapling extended full
/// viewing keys for the network to which this Parameters value applies.
fn hrp_sapling_extended_full_viewing_key(&self) -> &str;
@ -135,7 +135,7 @@ pub trait Parameters: Clone {
/// viewing keys for the network to which this Parameters value applies.
fn hrp_sapling_payment_address(&self) -> &str;
/// Returns the human-readable prefix for transparent pay-to-public-key-hash
/// Returns the human-readable prefix for transparent pay-to-public-key-hash
/// payment addresses for the network to which this Parameters value applies.
fn b58_pubkey_address_prefix(&self) -> [u8; 2];
@ -143,7 +143,7 @@ pub trait Parameters: Clone {
/// payment addresses for the network to which this Parameters value applies.
fn b58_script_address_prefix(&self) -> [u8; 2];
/// Determines whether the specified network upgrade is active as of the
/// Determines whether the specified network upgrade is active as of the
/// provided block height on the network to which this Parameters value applies.
fn is_nu_active(&self, nu: NetworkUpgrade, height: BlockHeight) -> bool {
self.activation_height(nu).map_or(false, |h| h <= height)