Merge remote-tracking branch 'upstream/master' into zip-207
This commit is contained in:
commit
4d223f9797
|
@ -293,6 +293,8 @@ class WalletTest (BitcoinTestFramework):
|
|||
mytxdetails = self.nodes[2].gettransaction(mytxid)
|
||||
myvjoinsplits = mytxdetails["vjoinsplit"]
|
||||
assert_equal(0, len(myvjoinsplits))
|
||||
assert("joinSplitPubKey" not in mytxdetails)
|
||||
assert("joinSplitSig" not in mytxdetails)
|
||||
|
||||
# z_sendmany is expected to fail if tx size breaks limit
|
||||
myzaddr = self.nodes[0].z_getnewaddress('sprout')
|
||||
|
@ -360,13 +362,19 @@ class WalletTest (BitcoinTestFramework):
|
|||
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]
|
||||
mytxdetails = self.nodes[2].getrawtransaction(mytxid, 1)
|
||||
myjoinsplit = mytxdetails["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())
|
||||
|
||||
assert(len(mytxdetails["joinSplitPubKey"]) == 64)
|
||||
int(mytxdetails["joinSplitPubKey"], 16) # throws if not a hex string
|
||||
assert(len(mytxdetails["joinSplitSig"]) == 128)
|
||||
int(mytxdetails["joinSplitSig"], 16) # hex string
|
||||
|
||||
# send from private note to node 0 and node 2
|
||||
node0balance = self.nodes[0].getbalance() # 25.99794745
|
||||
node2balance = self.nodes[2].getbalance() # 16.99790000
|
||||
|
|
|
@ -154,6 +154,8 @@ public:
|
|||
vSeeds.clear();
|
||||
vSeeds.push_back(CDNSSeedData("z.cash", "dnsseed.z.cash")); // Zcash
|
||||
vSeeds.push_back(CDNSSeedData("str4d.xyz", "dnsseed.str4d.xyz")); // @str4d
|
||||
vSeeds.push_back(CDNSSeedData("zfnd.org", "mainnet.seeder.zfnd.org")); // Zcash Foundation
|
||||
vSeeds.push_back(CDNSSeedData("yolo.money", "mainnet.is.yolo.money")); // gtank
|
||||
|
||||
// guarantees the first 2 characters, when base58 encoded, are "t1"
|
||||
base58Prefixes[PUBKEY_ADDRESS] = {0x1C,0xB8};
|
||||
|
@ -390,6 +392,8 @@ public:
|
|||
vFixedSeeds.clear();
|
||||
vSeeds.clear();
|
||||
vSeeds.push_back(CDNSSeedData("z.cash", "dnsseed.testnet.z.cash")); // Zcash
|
||||
vSeeds.push_back(CDNSSeedData("zfnd.org", "testnet.seeder.zfnd.org")); // Zcash Foundation
|
||||
vSeeds.push_back(CDNSSeedData("yolo.money", "testnet.is.yolo.money")); // gtank
|
||||
|
||||
// guarantees the first 2 characters, when base58 encoded, are "tm"
|
||||
base58Prefixes[PUBKEY_ADDRESS] = {0x1D,0x25};
|
||||
|
|
|
@ -231,6 +231,11 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
|
|||
}
|
||||
}
|
||||
|
||||
if (tx.nVersion >= 2 && tx.vJoinSplit.size() > 0) {
|
||||
entry.pushKV("joinSplitPubKey", tx.joinSplitPubKey.GetHex());
|
||||
entry.pushKV("joinSplitSig", HexStr(tx.joinSplitSig.begin(), tx.joinSplitSig.end()));
|
||||
}
|
||||
|
||||
if (!hashBlock.IsNull()) {
|
||||
entry.pushKV("blockhash", hashBlock.GetHex());
|
||||
BlockMap::iterator mi = mapBlockIndex.find(hashBlock);
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
namespace libzcash {
|
||||
|
||||
static CCriticalSection cs_ParamsIO;
|
||||
|
||||
template<size_t NumInputs, size_t NumOutputs>
|
||||
class JoinSplitCircuit : public JoinSplit<NumInputs, NumOutputs> {
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue