Fix LLVM compilation issues
[novacoin.git] / src / zerocoin / SpendMetaData.h
1 /**
2 * @file       SpendMetaData.h
3 *
4 * @brief      SpendMetaData class for the Zerocoin library.
5 *
6 * @author     Ian Miers, Christina Garman and Matthew Green
7 * @date       June 2013
8 *
9 * @copyright  Copyright 2013 Ian Miers, Christina Garman and Matthew Green
10 * @license    This project is released under the MIT license.
11 **/
12
13 #ifndef SPENDMETADATA_H_
14 #define SPENDMETADATA_H_
15
16 #include "../uint256.h"
17 #include "../serialize.h"
18
19 using namespace std;
20 namespace libzerocoin {
21
22 /** Any meta data needed for actual bitcoin integration.
23  * Can extended provided the getHash() function is updated
24  */
25 class SpendMetaData {
26 public:
27         /**
28          * Creates meta data associated with a coin spend
29          * @param accumulatorId hash of block containing accumulator
30          * @param txHash hash of transaction
31          */
32         SpendMetaData(uint256 accumulatorId, uint256 txHash);
33
34         /**
35          * The hash of the block containing the accumulator CoinSpend
36          * proves membership in.
37          */
38         uint256 accumulatorId; // The block the accumulator is in
39         /**Contains the hash of the rest of transaction
40          * spending a zerocoin (excluding the coinspend proof)
41          */
42         uint256 txHash; // The Hash of the rest of the transaction the spend proof is n.
43         // Allows us to sign the transaction.
44         IMPLEMENT_SERIALIZE
45         (
46             READWRITE(accumulatorId);
47             READWRITE(txHash);
48         )
49 };
50
51 } /* namespace libzerocoin */
52 #endif /* SPENDMETADATA_H_ */