Add test for Orchard contribution to z_gettotalbalance
This commit is contained in:
parent
1732a50957
commit
cf4d0f3d2d
|
@ -176,6 +176,10 @@ class WalletAccountsTest(BitcoinTestFramework):
|
|||
self.check_balance(0, 0, ua0, {'sapling': 9})
|
||||
self.check_balance(0, 0, ua0, {'sapling': 9, 'orchard': 10}, 0)
|
||||
|
||||
# The total balance with the default minconf should be just the Sapling balance
|
||||
assert_equal('9.00', self.nodes[0].z_gettotalbalance()['private'])
|
||||
assert_equal('19.00', self.nodes[0].z_gettotalbalance(0)['private'])
|
||||
|
||||
self.nodes[2].generate(1)
|
||||
self.sync_all()
|
||||
|
||||
|
|
|
@ -3410,6 +3410,9 @@ CAmount getBalanceZaddr(std::optional<libzcash::PaymentAddress> address, int min
|
|||
for (auto & entry : saplingEntries) {
|
||||
balance += CAmount(entry.note.value());
|
||||
}
|
||||
for (auto & entry : orchardEntries) {
|
||||
balance += entry.GetNoteValue();
|
||||
}
|
||||
return balance;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue