Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
This commit is contained in:
parent
c9ef5cd45a
commit
c3cf141936
|
@ -57,12 +57,12 @@ class WalletOrchardTest(BitcoinTestFramework):
|
||||||
myopid = self.nodes[0].z_sendmany(get_coinbase_address(self.nodes[0]), recipients, 1, 0)
|
myopid = self.nodes[0].z_sendmany(get_coinbase_address(self.nodes[0]), recipients, 1, 0)
|
||||||
wait_and_assert_operationid_status(self.nodes[0], myopid)
|
wait_and_assert_operationid_status(self.nodes[0], myopid)
|
||||||
|
|
||||||
# Mine the tx & activate Orchard
|
# Mine the tx & activate NU5
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
self.nodes[0].generate(10)
|
self.nodes[0].generate(10)
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
|
|
||||||
# Check the value on saplingAddr2
|
# Check the value sent to saplingAddr2 was received in node 2's account
|
||||||
assert_equal(
|
assert_equal(
|
||||||
{'pools': {'sapling': {'valueZat': Decimal('1000000000')}}, 'minimum_confirmations': 1},
|
{'pools': {'sapling': {'valueZat': Decimal('1000000000')}}, 'minimum_confirmations': 1},
|
||||||
self.nodes[2].z_getbalanceforaccount(acct2))
|
self.nodes[2].z_getbalanceforaccount(acct2))
|
||||||
|
|
|
@ -40,8 +40,9 @@ void orchard_wallet_free(OrchardWalletPtr* wallet);
|
||||||
bool orchard_wallet_reset(OrchardWalletPtr* wallet);
|
bool orchard_wallet_reset(OrchardWalletPtr* wallet);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a checkpoint to the wallet's note commitment tree to enable
|
* Checkpoint the note commitment tree. This returns `false` and leaves the note
|
||||||
* a future rewind.
|
* commitment tree unmodified if the block height specified is not the successor
|
||||||
|
* to the last block height checkpointed.
|
||||||
*/
|
*/
|
||||||
bool orchard_wallet_checkpoint(
|
bool orchard_wallet_checkpoint(
|
||||||
OrchardWalletPtr* wallet,
|
OrchardWalletPtr* wallet,
|
||||||
|
@ -55,7 +56,9 @@ bool orchard_wallet_checkpoint(
|
||||||
bool orchard_wallet_is_checkpointed(const OrchardWalletPtr* wallet);
|
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(
|
bool orchard_wallet_rewind(
|
||||||
OrchardWalletPtr* wallet,
|
OrchardWalletPtr* wallet,
|
||||||
|
|
|
@ -78,8 +78,8 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checkpoint the note commitment tree. This returns `false` and leaves the note
|
* 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
|
* commitment tree unmodified if the block height specified is not the successor
|
||||||
* height scanned for transactions. This must be called exactly once per block.
|
* to the last block height checkpointed.
|
||||||
*/
|
*/
|
||||||
bool CheckpointNoteCommitmentTree(int nBlockHeight) {
|
bool CheckpointNoteCommitmentTree(int nBlockHeight) {
|
||||||
assert(nBlockHeight >= 0);
|
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
|
* previously identified as having been spent by transactions in the
|
||||||
* latest block.
|
* latest block.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue