Auto merge of #2054 - str4d:2030-decoderawtransaction-joinsplit-fields, r=bitcartel

Show all JoinSplit components in getrawtransaction and decoderawtransaction

Closes #2030.
This commit is contained in:
zkbot
2017-02-09 22:56:01 +00:00
2 changed files with 80 additions and 2 deletions

View File

@@ -339,6 +339,15 @@ class WalletTest (BitcoinTestFramework):
myvjoinsplits = mytxdetails["vjoinsplit"]
assert_greater_than(len(myvjoinsplits), 0)
# the first (probably only) joinsplit should take in all the public value
myjoinsplit = self.nodes[2].getrawtransaction(mytxid, 1)["vjoinsplit"][0]
assert_equal(myjoinsplit["vpub_old"], zsendmanynotevalue)
assert_equal(myjoinsplit["vpub_new"], 0)
assert("onetimePubKey" in myjoinsplit.keys())
assert("randomSeed" in myjoinsplit.keys())
assert("ciphertexts" in myjoinsplit.keys())
# send from private note to node 0 and node 2
node0balance = self.nodes[0].getbalance() # 25.99794745
node2balance = self.nodes[2].getbalance() # 16.99790000