Skip to content

Commit

Permalink
Merge #2093: [Trivial][RPC] Drop 'ed' suffix from vShielded* in TxSap…
Browse files Browse the repository at this point in the history
…lingToJSON

8fd6af0 [Trivial][RPC] Drop 'ed' suffix from Shielded in TxSaplingToJSON (random-zebra)

Pull request description:

  One user-facing string left out in #2086

ACKs for top commit:
  furszy:
    utACK 8fd6af0
  Fuzzbawls:
    ACK 8fd6af0

Tree-SHA512: 7b3c89a567d51d283c32ef33b7e22ba5156774695fde4e977d0188e8288bebfe0beb4cfc16f53c3d9130fcb54ba201256a78b2fb88ff34dcb761a542a03dcc1e
  • Loading branch information
random-zebra committed Dec 22, 2020
2 parents c086365 + 8fd6af0 commit 9d0923f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/sapling/sapling_core_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ void TxSaplingToJSON(const CTransaction& tx, UniValue& entry) {
entry.pushKV("valueBalance", FormatMoney(tx.sapData->valueBalance));
entry.pushKV("valueBalanceSat", tx.sapData->valueBalance);
UniValue vspenddesc = TxShieldedSpendsToJSON(tx);
entry.pushKV("vShieldedSpend", vspenddesc);
entry.pushKV("vShieldSpend", vspenddesc);
UniValue voutputdesc = TxShieldedOutputsToJSON(tx);
entry.pushKV("vShieldedOutput", voutputdesc);
entry.pushKV("vShieldOutput", voutputdesc);
if (tx.sapData->hasBindingSig()) {
entry.pushKV("bindingSig", HexStr(tx.sapData->bindingSig.begin(), tx.sapData->bindingSig.end()));
}
Expand Down
2 changes: 1 addition & 1 deletion test/functional/sapling_mempool.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def run_test(self):
# Now disconnect the block with the note's anchor,
# and check that the tx is removed from the mempool
self.log.info("Disconnect the last block to change the sapling anchor")
anchor = txC_json['vShieldedSpend'][0]['anchor']
anchor = txC_json['vShieldSpend'][0]['anchor']
assert_equal(anchor, miner.getbestsaplinganchor())
miner.invalidateblock(miner.getbestblockhash())
assert (anchor != miner.getbestsaplinganchor())
Expand Down
8 changes: 4 additions & 4 deletions test/functional/sapling_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,17 @@ def run_test(self):
# Verify existence of Sapling related JSON fields
resp = self.nodes[0].getrawtransaction(mytxid7, 1)
assert_equal(Decimal(resp['valueBalance']), Decimal('11.00')) # 20 shield input - 8 shield spend - 1 change
assert_equal(len(resp['vShieldedSpend']), 3)
assert_equal(len(resp['vShieldedOutput']), 2)
assert_equal(len(resp['vShieldSpend']), 3)
assert_equal(len(resp['vShieldOutput']), 2)
assert('bindingSig' in resp)
shieldedSpend = resp['vShieldedSpend'][0]
shieldedSpend = resp['vShieldSpend'][0]
assert('cv' in shieldedSpend)
assert('anchor' in shieldedSpend)
assert('nullifier' in shieldedSpend)
assert('rk' in shieldedSpend)
assert('proof' in shieldedSpend)
assert('spendAuthSig' in shieldedSpend)
shieldedOutput = resp['vShieldedOutput'][0]
shieldedOutput = resp['vShieldOutput'][0]
assert('cv' in shieldedOutput)
assert('cmu' in shieldedOutput)
assert('ephemeralKey' in shieldedOutput)
Expand Down
2 changes: 1 addition & 1 deletion test/functional/sapling_wallet_listreceived.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def run_test(self):

# Verify the spent nullifier
tx_json = self.nodes[1].getrawtransaction(txid, True)
assert_equal(nullifier, tx_json["vShieldedSpend"][0]["nullifier"])
assert_equal(nullifier, tx_json["vShieldSpend"][0]["nullifier"])

# Decrypted transaction details should be correct
pt = self.nodes[1].viewshieldtransaction(txid)
Expand Down

0 comments on commit 9d0923f

Please sign in to comment.