Rename ZCASH_ constants to ZC_.

This commit is contained in:
Sean Bowe
2016-05-11 12:58:49 -06:00
parent 53ab7c06ba
commit a9640f67f1
5 changed files with 11 additions and 14 deletions

View File

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

View File

@@ -41,7 +41,7 @@ uint256 Note::nullifier(const SpendingKey& a_sk) const {
NotePlaintext::NotePlaintext( NotePlaintext::NotePlaintext(
const Note& note, 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; value = note.value;
rho = note.rho; rho = note.rho;

View File

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

View File

@@ -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::NoteEncryption<ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE> ZCNoteEncryption;
typedef libzcash::NoteDecryption<ZCASH_NOTEPLAINTEXT_LEADING + ZCASH_V_SIZE + ZCASH_RHO_SIZE + ZCASH_R_SIZE + ZCASH_MEMO_SIZE> ZCNoteDecryption; typedef libzcash::NoteDecryption<ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE> ZCNoteDecryption;
#endif /* ZC_NOTE_ENCRYPTION_H_ */ #endif /* ZC_NOTE_ENCRYPTION_H_ */

View File

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