Apply suggestions from code review

Co-authored-by: str4d <thestr4d@gmail.com>
This commit is contained in:
Kris Nuttycombe 2022-03-07 19:08:41 -07:00 committed by Kris Nuttycombe
parent c9ef5cd45a
commit c3cf141936
3 changed files with 11 additions and 8 deletions

View File

@ -57,12 +57,12 @@ class WalletOrchardTest(BitcoinTestFramework):
myopid = self.nodes[0].z_sendmany(get_coinbase_address(self.nodes[0]), recipients, 1, 0)
wait_and_assert_operationid_status(self.nodes[0], myopid)
# Mine the tx & activate Orchard
# Mine the tx & activate NU5
self.sync_all()
self.nodes[0].generate(10)
self.sync_all()
# Check the value on saplingAddr2
# Check the value sent to saplingAddr2 was received in node 2's account
assert_equal(
{'pools': {'sapling': {'valueZat': Decimal('1000000000')}}, 'minimum_confirmations': 1},
self.nodes[2].z_getbalanceforaccount(acct2))

View File

@ -40,8 +40,9 @@ void orchard_wallet_free(OrchardWalletPtr* wallet);
bool orchard_wallet_reset(OrchardWalletPtr* wallet);
/**
* Adds a checkpoint to the wallet's note commitment tree to enable
* a future rewind.
* Checkpoint the note commitment tree. This returns `false` and leaves the note
* commitment tree unmodified if the block height specified is not the successor
* to the last block height checkpointed.
*/
bool orchard_wallet_checkpoint(
OrchardWalletPtr* wallet,
@ -55,7 +56,9 @@ bool orchard_wallet_checkpoint(
bool orchard_wallet_is_checkpointed(const OrchardWalletPtr* wallet);
/**
* Rewinds to the most recently added checkpoint.
* Rewinds to the most recent checkpoint, and marks as unspent any notes
* previously identified as having been spent by transactions in the
* latest block.
*/
bool orchard_wallet_rewind(
OrchardWalletPtr* wallet,

View File

@ -78,8 +78,8 @@ public:
/**
* Checkpoint the note commitment tree. This returns `false` and leaves the note
* commitment tree unmodified if the block height does not match the last block
* height scanned for transactions. This must be called exactly once per block.
* commitment tree unmodified if the block height specified is not the successor
* to the last block height checkpointed.
*/
bool CheckpointNoteCommitmentTree(int nBlockHeight) {
assert(nBlockHeight >= 0);
@ -94,7 +94,7 @@ public:
}
/**
* Rewind to the most recent checkpoint, and mark as unspent any notes
* Rewinds to the most recent checkpoint, and marks as unspent any notes
* previously identified as having been spent by transactions in the
* latest block.
*/