Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
4eda33f184
commit
5a98080677
|
@ -295,7 +295,7 @@ OrchardSpendInfoPtr* orchard_wallet_get_spend_info(
|
|||
* Run the garbage collection operation on the wallet's note commitment
|
||||
* tree.
|
||||
*/
|
||||
bool orchard_wallet_gc_note_commitment_tree(OrchardWalletPtr* wallet);
|
||||
void orchard_wallet_gc_note_commitment_tree(OrchardWalletPtr* wallet);
|
||||
|
||||
/**
|
||||
* Write the wallet's note commitment tree to the provided stream.
|
||||
|
|
|
@ -253,8 +253,8 @@ impl Wallet {
|
|||
true
|
||||
}
|
||||
|
||||
/// Returns whether or not a checkpoint has been created. If no checkpoint exists,
|
||||
/// the wallet has not yet observed any blocks.
|
||||
/// Returns the last checkpoint if any. If no checkpoint exists, the wallet has not
|
||||
/// yet observed any blocks.
|
||||
pub fn last_checkpoint(&self) -> Option<BlockHeight> {
|
||||
self.last_checkpoint
|
||||
}
|
||||
|
@ -339,9 +339,9 @@ impl Wallet {
|
|||
}
|
||||
|
||||
/// Add note data for those notes that are decryptable with one of this wallet's
|
||||
/// incoming viewing keys to the wallet, and return a map from each decrypted
|
||||
/// action's index to the incoming viewing key that successfully decrypted that
|
||||
/// action.
|
||||
/// incoming viewing keys to the wallet, and return a a data structure that describes
|
||||
/// the actions that are involved with this wallet, either spending notes belonging
|
||||
/// to this wallet or creating new notes owned by this wallet.
|
||||
pub fn add_notes_from_bundle(
|
||||
&mut self,
|
||||
txid: &TxId,
|
||||
|
|
|
@ -2433,6 +2433,7 @@ void CWallet::DecrementNoteWitnesses(const Consensus::Params& consensus, const C
|
|||
// pindex->nHeight is the height of the block being removed, so we rewind
|
||||
// to the previous block height
|
||||
uint32_t blocksRewound{0};
|
||||
assert(pindex->nHeight >= 1);
|
||||
assert(orchardWallet.Rewind(pindex->nHeight - 1, blocksRewound));
|
||||
assert(blocksRewound == 1);
|
||||
if (consensus.NetworkUpgradeActive(pindex->nHeight - 1, Consensus::UPGRADE_NU5)) {
|
||||
|
|
Loading…
Reference in New Issue