Browse Source

Rename ZCASH_ constants to ZC_.

pull/145/head
Sean Bowe 8 years ago
parent
commit
a9640f67f1
  1. 2
      src/gtest/test_joinsplit.cpp
  2. 2
      src/zcash/Note.cpp
  3. 4
      src/zcash/NoteEncryption.cpp
  4. 4
      src/zcash/NoteEncryption.hpp
  5. 13
      src/zcash/Zcash.h

2
src/gtest/test_joinsplit.cpp

@ -193,7 +193,7 @@ TEST(joinsplit, note_plaintexts)
random_uint256()
);
boost::array<unsigned char, ZCASH_MEMO_SIZE> memo;
boost::array<unsigned char, ZC_MEMO_SIZE> memo;
NotePlaintext note_pt(note, memo);

2
src/zcash/Note.cpp

@ -41,7 +41,7 @@ uint256 Note::nullifier(const SpendingKey& a_sk) const {
NotePlaintext::NotePlaintext(
const Note& note,
boost::array<unsigned char, ZCASH_MEMO_SIZE> memo) : memo(memo)
boost::array<unsigned char, ZC_MEMO_SIZE> memo) : memo(memo)
{
value = note.value;
rho = note.rho;

4
src/zcash/NoteEncryption.cpp

@ -165,7 +165,7 @@ uint256 random_uint256()
return ret;
}
template class NoteEncryption<ZCASH_NOTEPLAINTEXT_LEADING + ZCASH_V_SIZE + ZCASH_RHO_SIZE + ZCASH_R_SIZE + ZCASH_MEMO_SIZE>;
template class NoteDecryption<ZCASH_NOTEPLAINTEXT_LEADING + ZCASH_V_SIZE + ZCASH_RHO_SIZE + ZCASH_R_SIZE + ZCASH_MEMO_SIZE>;
template class NoteEncryption<ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE>;
template class NoteDecryption<ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE>;
}

4
src/zcash/NoteEncryption.hpp

@ -73,7 +73,7 @@ uint256 random_uint256();
}
typedef libzcash::NoteEncryption<ZCASH_NOTEPLAINTEXT_LEADING + ZCASH_V_SIZE + ZCASH_RHO_SIZE + ZCASH_R_SIZE + ZCASH_MEMO_SIZE> ZCNoteEncryption;
typedef libzcash::NoteDecryption<ZCASH_NOTEPLAINTEXT_LEADING + ZCASH_V_SIZE + ZCASH_RHO_SIZE + ZCASH_R_SIZE + ZCASH_MEMO_SIZE> ZCNoteDecryption;
typedef libzcash::NoteEncryption<ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE> ZCNoteEncryption;
typedef libzcash::NoteDecryption<ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE> ZCNoteDecryption;
#endif /* ZC_NOTE_ENCRYPTION_H_ */

13
src/zcash/Zcash.h

@ -6,13 +6,10 @@
#define INCREMENTAL_MERKLE_TREE_DEPTH 20
#define INCREMENTAL_MERKLE_TREE_DEPTH_TESTING 4
// TODO: these constants should be 'ZC'
// for consistency, but I didn't want to
// interfere with the old constants
#define ZCASH_NOTEPLAINTEXT_LEADING 1
#define ZCASH_V_SIZE 8
#define ZCASH_RHO_SIZE 32
#define ZCASH_R_SIZE 32
#define ZCASH_MEMO_SIZE 128
#define ZC_NOTEPLAINTEXT_LEADING 1
#define ZC_V_SIZE 8
#define ZC_RHO_SIZE 32
#define ZC_R_SIZE 32
#define ZC_MEMO_SIZE 128
#endif // _ZCCONSTANTS_H_

Loading…
Cancel
Save