| 47 | } |
| 48 | |
| 49 | void CalculateReissuanceToken(CAsset& reissuanceToken, const uint256& entropy, bool fConfidential) |
| 50 | { |
| 51 | static const uint256 kOne = uint256S("0x0000000000000000000000000000000000000000000000000000000000000001"); |
| 52 | static const uint256 kTwo = uint256S("0x0000000000000000000000000000000000000000000000000000000000000002"); |
| 53 | // H_a : asset reissuance tag |
| 54 | // E : entropy |
| 55 | // if not fConfidential: |
| 56 | // H_a = H( E || 1 ) |
| 57 | // else |
| 58 | // H_a = H( E || 2 ) |
| 59 | std::vector<uint256> leaves; |
| 60 | leaves.reserve(2); |
| 61 | leaves.push_back(entropy); |
| 62 | leaves.push_back(fConfidential ? kTwo : kOne); |
| 63 | reissuanceToken = CAsset(ComputeFastMerkleRoot(leaves)); |
| 64 | } |
| 65 | |
| 66 | /** Add an issuance transaction to the genesis block. Typically used to pre-issue |
| 67 | * the policyAsset of a blockchain. The genesis block is not actually validated, |
no test coverage detected