Skip to content

Commit e489677

Browse files
committed
[Tests] Check spent nullifier in sapling_wallet_listreceived
1 parent e55a089 commit e489677

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/functional/sapling_wallet_listreceived.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ def run_test(self):
120120
# Now can check that the information is the same
121121
assert_equal(r, r2)
122122

123+
# Get the note nullifier
124+
lsu = self.nodes[1].listshieldedunspent();
125+
assert_equal(len(lsu), 1)
126+
nullifier = lsu[0]["nullifier"]
127+
123128
# Generate some change by sending part of shield_addr1 to shield_addr2
124129
txidPrev = txid
125130
shield_addr2 = self.nodes[1].getnewshieldedaddress()
@@ -129,6 +134,10 @@ def run_test(self):
129134
self.sync_all()
130135
self.generate_and_sync(height+4)
131136

137+
# Verify the spent nullifier
138+
tx_json = self.nodes[1].getrawtransaction(txid, True)
139+
assert_equal(nullifier, tx_json["vShieldedSpend"][0]["nullifier"])
140+
132141
# Decrypted transaction details should be correct
133142
pt = self.nodes[1].viewshieldedtransaction(txid)
134143
assert_equal(pt['txid'], txid)

0 commit comments

Comments
 (0)