]> Git Repo - VerusCoin.git/commitdiff
Refactoring: Rename class libzcash::Note to libzcash::SproutNote.
authorSimon <[email protected]>
Wed, 25 Apr 2018 04:20:01 +0000 (21:20 -0700)
committerSimon <[email protected]>
Wed, 25 Apr 2018 18:33:24 +0000 (11:33 -0700)
21 files changed:
src/gtest/test_joinsplit.cpp
src/gtest/test_transaction.cpp
src/primitives/transaction.cpp
src/test/coins_tests.cpp
src/test/rpc_wallet_tests.cpp
src/test/transaction_tests.cpp
src/utiltest.cpp
src/utiltest.h
src/wallet/asyncrpcoperation_mergetoaddress.cpp
src/wallet/asyncrpcoperation_mergetoaddress.h
src/wallet/asyncrpcoperation_sendmany.cpp
src/wallet/asyncrpcoperation_sendmany.h
src/wallet/gtest/test_wallet.cpp
src/wallet/rpcdisclosure.cpp
src/wallet/rpcwallet.cpp
src/zcash/JoinSplit.cpp
src/zcash/JoinSplit.hpp
src/zcash/Note.cpp
src/zcash/Note.hpp
src/zcash/circuit/gadget.tcc
src/zcash/circuit/note.tcc

index 979d0d5185b9963437e8bd327de1d728e7b2a1cb..a9814e4ab9a14c58dd26676929f8f82b1958fadb 100644 (file)
@@ -52,7 +52,7 @@ void test_full_api(ZCJoinSplit* js)
             JSOutput() // dummy output
         };
 
-        boost::array<Note, 2> output_notes;
+        boost::array<SproutNote, 2> output_notes;
 
         // Perform the proof
         proof = js->prove(
@@ -127,7 +127,7 @@ void test_full_api(ZCJoinSplit* js)
             JSOutput() // dummy output
         };
 
-        boost::array<Note, 2> output_notes;
+        boost::array<SproutNote, 2> output_notes;
 
         // Perform the proof
         proof = js->prove(
@@ -180,7 +180,7 @@ void invokeAPI(
     boost::array<uint256, 2> commitments;
     boost::array<ZCNoteEncryption::Ciphertext, 2> ciphertexts;
 
-    boost::array<Note, 2> output_notes;
+    boost::array<SproutNote, 2> output_notes;
 
     ZCProof proof = js->prove(
         inputs,
@@ -316,15 +316,15 @@ TEST(joinsplit, full_api_test)
         increment_note_witnesses(uint256(), witnesses, tree);
         SpendingKey sk = SpendingKey::random();
         PaymentAddress addr = sk.address();
-        Note note1(addr.a_pk, 100, random_uint256(), random_uint256());
+        SproutNote note1(addr.a_pk, 100, random_uint256(), random_uint256());
         increment_note_witnesses(note1.cm(), witnesses, tree);
-        Note note2(addr.a_pk, 100, random_uint256(), random_uint256());
+        SproutNote note2(addr.a_pk, 100, random_uint256(), random_uint256());
         increment_note_witnesses(note2.cm(), witnesses, tree);
-        Note note3(addr.a_pk, 2100000000000001, random_uint256(), random_uint256());
+        SproutNote note3(addr.a_pk, 2100000000000001, random_uint256(), random_uint256());
         increment_note_witnesses(note3.cm(), witnesses, tree);
-        Note note4(addr.a_pk, 1900000000000000, random_uint256(), random_uint256());
+        SproutNote note4(addr.a_pk, 1900000000000000, random_uint256(), random_uint256());
         increment_note_witnesses(note4.cm(), witnesses, tree);
-        Note note5(addr.a_pk, 1900000000000000, random_uint256(), random_uint256());
+        SproutNote note5(addr.a_pk, 1900000000000000, random_uint256(), random_uint256());
         increment_note_witnesses(note5.cm(), witnesses, tree);
 
         // Should work
@@ -523,7 +523,7 @@ TEST(joinsplit, note_plaintexts)
     ZCNoteEncryption encryptor(h_sig);
     uint256 epk = encryptor.get_epk();
 
-    Note note(a_pk,
+    SproutNote note(a_pk,
               1945813,
               random_uint256(),
               random_uint256()
index fb68fd35cb6df781fe9355e19367c04455fcc92c..0f78fcb39e4d2633f9a81975a7cc5316d485f078 100644 (file)
@@ -15,7 +15,7 @@ TEST(Transaction, JSDescriptionRandomized) {
     libzcash::SpendingKey k = libzcash::SpendingKey::random();
     libzcash::PaymentAddress addr = k.address();
 
-    libzcash::Note note(addr.a_pk, 100, uint256(), uint256());
+    libzcash::SproutNote note(addr.a_pk, 100, uint256(), uint256());
 
     // commitment from coin
     uint256 commitment = note.cm();
index 4f61b24eab11c1de407e9a660f8a09f6b6f61ca1..87b5600e57541e5d4640494edd0a3b5aaf62cbd9 100644 (file)
@@ -20,7 +20,7 @@ JSDescription::JSDescription(ZCJoinSplit& params,
             uint256 *esk // payment disclosure
             ) : vpub_old(vpub_old), vpub_new(vpub_new), anchor(anchor)
 {
-    boost::array<libzcash::Note, ZC_NUM_JS_OUTPUTS> notes;
+    boost::array<libzcash::SproutNote, ZC_NUM_JS_OUTPUTS> notes;
 
     proof = params.prove(
         inputs,
index 383616ae0dffcd7ef755d8fcfc0af75074d5aec9..125a2b03e91f46bf82223f8f0688ae772d3d6f76 100644 (file)
@@ -157,7 +157,7 @@ uint256 appendRandomCommitment(ZCIncrementalMerkleTree &tree)
     libzcash::SpendingKey k = libzcash::SpendingKey::random();
     libzcash::PaymentAddress addr = k.address();
 
-    libzcash::Note note(addr.a_pk, 0, uint256(), uint256());
+    libzcash::SproutNote note(addr.a_pk, 0, uint256(), uint256());
 
     auto cm = note.cm();
     tree.append(cm);
index ce2da60c1218a18b967f61e9d5f8f10e813d5a13..d097649087d0addef20b54d0efc9e1355ce45685 100644 (file)
@@ -1178,7 +1178,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_internals)
             BOOST_CHECK( string(e.what()).find("anchor is null")!= string::npos);
         }
 
-        info.notes.push_back(Note());
+        info.notes.push_back(SproutNote());
         try {
             proxy.perform_joinsplit(info);
         } catch (const std::runtime_error & e) {
@@ -1716,7 +1716,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_mergetoaddress_internals)
             BOOST_CHECK( string(e.what()).find("anchor is null")!= string::npos);
         }
 
-        info.notes.push_back(Note());
+        info.notes.push_back(SproutNote());
         try {
             proxy.perform_joinsplit(info);
             BOOST_FAIL("Should have caused an error");
index 1b0b26ee78c9f3b2f41688548f9d7d5bc6b77da7..af15adcce185d121304beef63c75e3e4c3a43414 100644 (file)
@@ -345,7 +345,7 @@ BOOST_AUTO_TEST_CASE(test_basic_joinsplit_verification)
     libzcash::SpendingKey k = libzcash::SpendingKey::random();
     libzcash::PaymentAddress addr = k.address();
 
-    libzcash::Note note(addr.a_pk, 100, uint256(), uint256());
+    libzcash::SproutNote note(addr.a_pk, 100, uint256(), uint256());
 
     // commitment from coin
     uint256 commitment = note.cm();
index 4599cec3c5f2093935eb973ddfde5ce4eccb1dbf..8245adf8e4eb156b0d5a278610181d0b713ffbfa 100644 (file)
@@ -38,7 +38,7 @@ CWalletTx GetValidReceive(ZCJoinSplit& params,
         libzcash::JSOutput(sk.address(), value)
     };
 
-    boost::array<libzcash::Note, 2> output_notes;
+    boost::array<libzcash::SproutNote, 2> output_notes;
 
     // Prepare JoinSplits
     uint256 rt;
@@ -63,7 +63,7 @@ CWalletTx GetValidReceive(ZCJoinSplit& params,
     return wtx;
 }
 
-libzcash::Note GetNote(ZCJoinSplit& params,
+libzcash::SproutNote GetNote(ZCJoinSplit& params,
                        const libzcash::SpendingKey& sk,
                        const CTransaction& tx, size_t js, size_t n) {
     ZCNoteDecryption decryptor {sk.receiving_key()};
@@ -79,7 +79,7 @@ libzcash::Note GetNote(ZCJoinSplit& params,
 
 CWalletTx GetValidSpend(ZCJoinSplit& params,
                         const libzcash::SpendingKey& sk,
-                        const libzcash::Note& note, CAmount value) {
+                        const libzcash::SproutNote& note, CAmount value) {
     CMutableTransaction mtx;
     mtx.vout.resize(2);
     mtx.vout[0].nValue = value;
@@ -105,7 +105,7 @@ CWalletTx GetValidSpend(ZCJoinSplit& params,
         } else if (note.value < value) {
             libzcash::SpendingKey dummykey = libzcash::SpendingKey::random();
             libzcash::PaymentAddress dummyaddr = dummykey.address();
-            libzcash::Note dummynote(dummyaddr.a_pk, (value - note.value), uint256(), uint256());
+            libzcash::SproutNote dummynote(dummyaddr.a_pk, (value - note.value), uint256(), uint256());
             tree.append(dummynote.cm());
             dummyin = libzcash::JSInput(tree.witness(), dummynote, dummykey);
         }
@@ -123,7 +123,7 @@ CWalletTx GetValidSpend(ZCJoinSplit& params,
         libzcash::JSOutput() // dummy output
     };
 
-    boost::array<libzcash::Note, 2> output_notes;
+    boost::array<libzcash::SproutNote, 2> output_notes;
 
     // Prepare JoinSplits
     uint256 rt = tree.root();
index 8cfa60d0617eede8c889dcee41a3fe8f608b2521..d9da2a1dec6c7596923120f9e0ff50c07c8fda95 100644 (file)
@@ -10,9 +10,9 @@
 CWalletTx GetValidReceive(ZCJoinSplit& params,
                           const libzcash::SpendingKey& sk, CAmount value,
                           bool randomInputs);
-libzcash::Note GetNote(ZCJoinSplit& params,
+libzcash::SproutNote GetNote(ZCJoinSplit& params,
                        const libzcash::SpendingKey& sk,
                        const CTransaction& tx, size_t js, size_t n);
 CWalletTx GetValidSpend(ZCJoinSplit& params,
                         const libzcash::SpendingKey& sk,
-                        const libzcash::Note& note, CAmount value);
+                        const libzcash::SproutNote& note, CAmount value);
index d029c79c591b187c3a43a40c8353f053081e3c4f..6e6d3c7d0995aa107aae3f58b0d96b8bc534dc5a 100644 (file)
@@ -462,7 +462,7 @@ bool AsyncRPCOperation_mergetoaddress::main_impl()
                     hSig,
                     (unsigned char)changeOutputIndex);
 
-                Note note = plaintext.note(changeAddress);
+                SproutNote note = plaintext.note(changeAddress);
                 info.notes.push_back(note);
                 info.zkeys.push_back(changeKey);
 
@@ -481,7 +481,7 @@ bool AsyncRPCOperation_mergetoaddress::main_impl()
         //
         // Consume spendable non-change notes
         //
-        std::vector<Note> vInputNotes;
+        std::vector<SproutNote> vInputNotes;
         std::vector<SpendingKey> vInputZKeys;
         std::vector<JSOutPoint> vOutPoints;
         std::vector<boost::optional<ZCIncrementalWitness>> vInputWitnesses;
@@ -490,7 +490,7 @@ bool AsyncRPCOperation_mergetoaddress::main_impl()
         while (numInputsNeeded++ < ZC_NUM_JS_INPUTS && zInputsDeque.size() > 0) {
             MergeToAddressInputNote t = zInputsDeque.front();
             JSOutPoint jso = std::get<0>(t);
-            Note note = std::get<1>(t);
+            SproutNote note = std::get<1>(t);
             CAmount noteFunds = std::get<2>(t);
             SpendingKey zkey = std::get<3>(t);
             zInputsDeque.pop_front();
index 34548a5baebd3c27ed12ce643a0e75fa6264caed..9b291cdf65d2bd96585f43eefccab9946aaef5d7 100644 (file)
@@ -28,7 +28,7 @@ using namespace libzcash;
 typedef std::tuple<COutPoint, CAmount> MergeToAddressInputUTXO;
 
 // Input JSOP is a tuple of JSOutpoint, note, amount, spending key
-typedef std::tuple<JSOutPoint, Note, CAmount, SpendingKey> MergeToAddressInputNote;
+typedef std::tuple<JSOutPoint, SproutNote, CAmount, SpendingKey> MergeToAddressInputNote;
 
 // A recipient is a tuple of address, memo (optional if zaddr)
 typedef std::tuple<std::string, std::string> MergeToAddressRecipient;
@@ -37,7 +37,7 @@ typedef std::tuple<std::string, std::string> MergeToAddressRecipient;
 struct MergeToAddressJSInfo {
     std::vector<JSInput> vjsin;
     std::vector<JSOutput> vjsout;
-    std::vector<Note> notes;
+    std::vector<SproutNote> notes;
     std::vector<SpendingKey> zkeys;
     CAmount vpub_old = 0;
     CAmount vpub_new = 0;
index 35c5fcfcb96b66b6283194a48a281780f86d876e..de6da102f14df7cfc920d7ff53fee1f10502767d 100644 (file)
@@ -578,7 +578,7 @@ bool AsyncRPCOperation_sendmany::main_impl() {
                         hSig,
                         (unsigned char) changeOutputIndex);
 
-                Note note = plaintext.note(frompaymentaddress_);
+                SproutNote note = plaintext.note(frompaymentaddress_);
                 info.notes.push_back(note);
 
                 jsInputValue += plaintext.value;
@@ -597,7 +597,7 @@ bool AsyncRPCOperation_sendmany::main_impl() {
         //
         // Consume spendable non-change notes
         //
-        std::vector<Note> vInputNotes;
+        std::vector<SproutNote> vInputNotes;
         std::vector<JSOutPoint> vOutPoints;
         std::vector<boost::optional<ZCIncrementalWitness>> vInputWitnesses;
         uint256 inputAnchor;
@@ -605,7 +605,7 @@ bool AsyncRPCOperation_sendmany::main_impl() {
         while (numInputsNeeded++ < ZC_NUM_JS_INPUTS && zInputsDeque.size() > 0) {
             SendManyInputJSOP t = zInputsDeque.front();
             JSOutPoint jso = std::get<0>(t);
-            Note note = std::get<1>(t);
+            SproutNote note = std::get<1>(t);
             CAmount noteFunds = std::get<2>(t);
             zInputsDeque.pop_front();
 
index 113f11f4931a60d6474e6f8c23a29552b2ae505c..97c4533f1252684268cd8cc32806a67db6281d0c 100644 (file)
@@ -31,14 +31,14 @@ typedef std::tuple<std::string, CAmount, std::string> SendManyRecipient;
 typedef std::tuple<uint256, int, CAmount, bool> SendManyInputUTXO;
 
 // Input JSOP is a tuple of JSOutpoint, note and amount
-typedef std::tuple<JSOutPoint, Note, CAmount> SendManyInputJSOP;
+typedef std::tuple<JSOutPoint, SproutNote, CAmount> SendManyInputJSOP;
 
 // Package of info which is passed to perform_joinsplit methods.
 struct AsyncJoinSplitInfo
 {
     std::vector<JSInput> vjsin;
     std::vector<JSOutput> vjsout;
-    std::vector<Note> notes;
+    std::vector<SproutNote> notes;
     CAmount vpub_old = 0;
     CAmount vpub_new = 0;
 };
index e976e4ae4330ff928719fbac661c7338ea8b8433..78984abed8bea118762e069374af65c77c626174 100644 (file)
@@ -72,13 +72,13 @@ CWalletTx GetValidReceive(const libzcash::SpendingKey& sk, CAmount value, bool r
     return GetValidReceive(*params, sk, value, randomInputs);
 }
 
-libzcash::Note GetNote(const libzcash::SpendingKey& sk,
+libzcash::SproutNote GetNote(const libzcash::SpendingKey& sk,
                        const CTransaction& tx, size_t js, size_t n) {
     return GetNote(*params, sk, tx, js, n);
 }
 
 CWalletTx GetValidSpend(const libzcash::SpendingKey& sk,
-                        const libzcash::Note& note, CAmount value) {
+                        const libzcash::SproutNote& note, CAmount value) {
     return GetValidSpend(*params, sk, note, value);
 }
 
index 539cf4b2a91892b3a5f930fd39854e5e6d88b51e..e1c20ab0b71c4566e91618fdff6f63256237edf4 100644 (file)
@@ -283,7 +283,7 @@ UniValue z_validatepaymentdisclosure(const UniValue& params, bool fHelp)
             
             // Check the blockchain commitment matches decrypted note commitment
             uint256 cm_blockchain =  jsdesc.commitments[pd.payload.n];
-            Note note = npt.note(zaddr);
+            SproutNote note = npt.note(zaddr);
             uint256 cm_decrypted = note.cm();
             bool cm_match = (cm_decrypted == cm_blockchain);
             o.push_back(Pair("commitmentMatch", cm_match));
index e86f0e2dec7fa48ba3dd2ab85ff4b859fda331d0..3b237a7ce1eafd9861394882b35d95e98d66a6e7 100644 (file)
@@ -2817,7 +2817,7 @@ UniValue zc_raw_receive(const UniValue& params, bool fHelp)
         nonce
     );
     PaymentAddress payment_addr = k.address();
-    Note decrypted_note = npt.note(payment_addr);
+    SproutNote decrypted_note = npt.note(payment_addr);
 
     assert(pwalletMain != NULL);
     std::vector<boost::optional<ZCIncrementalWitness>> witnesses;
@@ -2891,7 +2891,7 @@ UniValue zc_raw_joinsplit(const UniValue& params, bool fHelp)
 
     std::vector<JSInput> vjsin;
     std::vector<JSOutput> vjsout;
-    std::vector<Note> notes;
+    std::vector<SproutNote> notes;
     std::vector<SpendingKey> keys;
     std::vector<uint256> commitments;
 
@@ -2909,7 +2909,7 @@ UniValue zc_raw_joinsplit(const UniValue& params, bool fHelp)
         }
 
         PaymentAddress addr = k.address();
-        Note note = npt.note(addr);
+        SproutNote note = npt.note(addr);
         notes.push_back(note);
         commitments.push_back(note.cm());
     }
index 2685569d35dd2b8e47d9b047f5b09d3e291b989e..2d7ed115375b83bdcec03ae34e8587a3520ab747 100644 (file)
@@ -139,7 +139,7 @@ public:
     ZCProof prove(
         const boost::array<JSInput, NumInputs>& inputs,
         const boost::array<JSOutput, NumOutputs>& outputs,
-        boost::array<Note, NumOutputs>& out_notes,
+        boost::array<SproutNote, NumOutputs>& out_notes,
         boost::array<ZCNoteEncryption::Ciphertext, NumOutputs>& out_ciphertexts,
         uint256& out_ephemeralKey,
         const uint256& pubKeyHash,
@@ -364,10 +364,10 @@ uint256 JoinSplit<NumInputs, NumOutputs>::h_sig(
     return output;
 }
 
-Note JSOutput::note(const uint252& phi, const uint256& r, size_t i, const uint256& h_sig) const {
+SproutNote JSOutput::note(const uint252& phi, const uint256& r, size_t i, const uint256& h_sig) const {
     uint256 rho = PRF_rho(phi, i, h_sig);
 
-    return Note(addr.a_pk, value, rho, r);
+    return SproutNote(addr.a_pk, value, rho, r);
 }
 
 JSOutput::JSOutput() : addr(uint256(), uint256()), value(0) {
@@ -377,7 +377,7 @@ JSOutput::JSOutput() : addr(uint256(), uint256()), value(0) {
 
 JSInput::JSInput() : witness(ZCIncrementalMerkleTree().witness()),
                      key(SpendingKey::random()) {
-    note = Note(key.address().a_pk, 0, random_uint256(), random_uint256());
+    note = SproutNote(key.address().a_pk, 0, random_uint256(), random_uint256());
     ZCIncrementalMerkleTree dummy_tree;
     dummy_tree.append(note.cm());
     witness = dummy_tree.witness();
index 6a2d4e1f2ff2b2beea281e8f1c7f2ae248db3443..28ca98e973c1486e71852260bdcf8ecd750a6c5d 100644 (file)
@@ -18,12 +18,12 @@ namespace libzcash {
 class JSInput {
 public:
     ZCIncrementalWitness witness;
-    Note note;
+    SproutNote note;
     SpendingKey key;
 
     JSInput();
     JSInput(ZCIncrementalWitness witness,
-            Note note,
+            SproutNote note,
             SpendingKey key) : witness(witness), note(note), key(key) { }
 
     uint256 nullifier() const {
@@ -40,7 +40,7 @@ public:
     JSOutput();
     JSOutput(PaymentAddress addr, uint64_t value) : addr(addr), value(value) { }
 
-    Note note(const uint252& phi, const uint256& r, size_t i, const uint256& h_sig) const;
+    SproutNote note(const uint252& phi, const uint256& r, size_t i, const uint256& h_sig) const;
 };
 
 template<size_t NumInputs, size_t NumOutputs>
@@ -62,7 +62,7 @@ public:
     virtual ZCProof prove(
         const boost::array<JSInput, NumInputs>& inputs,
         const boost::array<JSOutput, NumOutputs>& outputs,
-        boost::array<Note, NumOutputs>& out_notes,
+        boost::array<SproutNote, NumOutputs>& out_notes,
         boost::array<ZCNoteEncryption::Ciphertext, NumOutputs>& out_ciphertexts,
         uint256& out_ephemeralKey,
         const uint256& pubKeyHash,
index afef814580348b5b103cabaa8720ee656ef29a80..c16a225ffb9f9c06f7e38d1ee7c7de8e139d935b 100644 (file)
@@ -9,14 +9,14 @@
 
 namespace libzcash {
 
-Note::Note() {
+SproutNote::SproutNote() {
     a_pk = random_uint256();
     rho = random_uint256();
     r = random_uint256();
     value = 0;
 }
 
-uint256 Note::cm() const {
+uint256 SproutNote::cm() const {
     unsigned char discriminant = 0xb0;
 
     CSHA256 hasher;
@@ -35,12 +35,12 @@ uint256 Note::cm() const {
     return result;
 }
 
-uint256 Note::nullifier(const SpendingKey& a_sk) const {
+uint256 SproutNote::nullifier(const SpendingKey& a_sk) const {
     return PRF_nf(a_sk, rho);
 }
 
 NotePlaintext::NotePlaintext(
-    const Note& note,
+    const SproutNote& note,
     boost::array<unsigned char, ZC_MEMO_SIZE> memo) : memo(memo)
 {
     value = note.value;
@@ -48,9 +48,9 @@ NotePlaintext::NotePlaintext(
     r = note.r;
 }
 
-Note NotePlaintext::note(const PaymentAddress& addr) const
+SproutNote NotePlaintext::note(const PaymentAddress& addr) const
 {
-    return Note(addr.a_pk, value, rho, r);
+    return SproutNote(addr.a_pk, value, rho, r);
 }
 
 NotePlaintext NotePlaintext::decrypt(const ZCNoteDecryption& decryptor,
index 6261937d27c6a4706c08a75d6f6c284abba37570..623fdbb6c5fc14be15d9b7d5d57020877b7fc9aa 100644 (file)
@@ -13,17 +13,17 @@ public:
     virtual uint256 cm() const {};
 };
 
-class Note : public BaseNote {
+class SproutNote : public BaseNote {
 public:
     uint256 a_pk;
     uint64_t value;
     uint256 rho;
     uint256 r;
 
-    Note(uint256 a_pk, uint64_t value, uint256 rho, uint256 r)
+    SproutNote(uint256 a_pk, uint64_t value, uint256 rho, uint256 r)
         : a_pk(a_pk), value(value), rho(rho), r(r) {}
 
-    Note();
+    SproutNote();
 
     virtual uint256 cm() const override;
 
@@ -39,9 +39,9 @@ public:
 
     NotePlaintext() {}
 
-    NotePlaintext(const Note& note, boost::array<unsigned char, ZC_MEMO_SIZE> memo);
+    NotePlaintext(const SproutNote& note, boost::array<unsigned char, ZC_MEMO_SIZE> memo);
 
-    Note note(const PaymentAddress& addr) const;
+    SproutNote note(const PaymentAddress& addr) const;
 
     ADD_SERIALIZE_METHODS;
 
index 141ec834ef3f546d79cdee867114771bfbed2127..d13c05962e680feda6f472b8b86201e99978b927 100644 (file)
@@ -191,7 +191,7 @@ public:
         const uint256& rt,
         const uint256& h_sig,
         const boost::array<JSInput, NumInputs>& inputs,
-        const boost::array<Note, NumOutputs>& outputs,
+        const boost::array<SproutNote, NumOutputs>& outputs,
         uint64_t vpub_old,
         uint64_t vpub_new
     ) {
index f472cb1513018e4a69d17b9775c06b13fcd5a7e1..69526ec71b9019edc34f7cb03f3affa18c90de5d 100644 (file)
@@ -21,7 +21,7 @@ public:
         r->generate_r1cs_constraints();
     }
 
-    void generate_r1cs_witness(const Note& note) {
+    void generate_r1cs_witness(const SproutNote& note) {
         r->bits.fill_with_bits(this->pb, uint256_to_bool_vector(note.r));
         value.fill_with_bits(this->pb, uint64_to_bool_vector(note.value));
     }
@@ -119,7 +119,7 @@ public:
     void generate_r1cs_witness(
         const MerklePath& path,
         const SpendingKey& key,
-        const Note& note
+        const SproutNote& note
     ) {
         note_gadget<FieldT>::generate_r1cs_witness(note);
 
@@ -222,7 +222,7 @@ public:
         commit_to_outputs->generate_r1cs_constraints();
     }
 
-    void generate_r1cs_witness(const Note& note) {
+    void generate_r1cs_witness(const SproutNote& note) {
         note_gadget<FieldT>::generate_r1cs_witness(note);
 
         prevent_faerie_gold->generate_r1cs_witness();
This page took 0.057127 seconds and 4 git commands to generate.