Apply suggestions from code review

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Kris Nuttycombe 2021-12-29 09:12:44 -07:00 committed by Kris Nuttycombe
parent 74e4bef6f2
commit 5d07a8ae79
3 changed files with 4 additions and 10 deletions

View File

@ -306,7 +306,7 @@ bool CBasicKeyStore::AddUnifiedFullViewingKey(
// We can't reasonably add the transparent component here, because
// of the way that transparent addresses are generated from the
// P2PHK part of the unified address. Instead, whenever a new
// P2PKH part of the unified address. Instead, whenever a new
// unified address is generated, the keys associated with the
// transparent part of the address must be added to the keystore.

View File

@ -355,7 +355,7 @@ extern "C" {
/**
* Decrypts a Sapling diversifier using the specified diversifier key
* to obtain the diversifier index `j` at which the diversivier was
* to obtain the diversifier index `j` at which the diversifier was
* derived.
*
* Arguments:

View File

@ -184,7 +184,7 @@ TEST(WalletTests, SproutNoteDataSerialisation) {
TEST(WalletTests, FindUnspentSproutNotes) {
auto consensusParams = RegtestActivateSapling();
SelectParams(CBaseChainParams::TESTNET);
CWallet wallet(Params());
LOCK2(cs_main, wallet.cs_wallet);
@ -379,8 +379,6 @@ TEST(WalletTests, SetSproutNoteAddrsInCWalletTx) {
}
TEST(WalletTests, SetSaplingNoteAddrsInCWalletTx) {
SelectParams(CBaseChainParams::REGTEST);
std::vector<libzcash::Zip212Enabled> zip_212_enabled = {libzcash::Zip212Enabled::BeforeZip212, libzcash::Zip212Enabled::AfterZip212};
const Consensus::Params& (*activations [])() = {RegtestActivateSapling, RegtestActivateCanopy};
void (*deactivations [])() = {RegtestDeactivateSapling, RegtestDeactivateCanopy};
@ -659,8 +657,6 @@ TEST(WalletTests, GetConflictedSproutNotes) {
// Generate note A and spend to create note B, from which we spend to create two conflicting transactions
TEST(WalletTests, GetConflictedSaplingNotes) {
SelectParams(CBaseChainParams::REGTEST);
std::vector<libzcash::Zip212Enabled> zip_212_enabled = {libzcash::Zip212Enabled::BeforeZip212, libzcash::Zip212Enabled::AfterZip212};
const Consensus::Params& (*activations [])() = {RegtestActivateSapling, RegtestActivateCanopy};
void (*deactivations [])() = {RegtestDeactivateSapling, RegtestDeactivateCanopy};
@ -1036,8 +1032,6 @@ TEST(WalletTests, SpentSproutNoteIsFromMe) {
// Create note A, spend A to create note B, spend and verify note B is from me.
TEST(WalletTests, SpentSaplingNoteIsFromMe) {
SelectParams(CBaseChainParams::REGTEST);
std::vector<libzcash::Zip212Enabled> zip_212_enabled = {libzcash::Zip212Enabled::BeforeZip212, libzcash::Zip212Enabled::AfterZip212};
const Consensus::Params& (*activations [])() = {RegtestActivateSapling, RegtestActivateCanopy};
void (*deactivations [])() = {RegtestDeactivateSapling, RegtestDeactivateCanopy};
@ -2173,7 +2167,7 @@ TEST(WalletTests, SaplingNoteLocking) {
}
TEST(WalletTests, GenerateUnifiedAddress) {
SelectParams(CBaseChainParams::TESTNET);
(void) RegtestActivateSapling();
TestWallet wallet(Params());
UAGenerationResult uaResult = wallet.GenerateUnifiedAddress(0, diversifier_index_t(0), {ReceiverType::P2PKH, ReceiverType::Sapling});