36 static const unsigned int tx_counts[] = {1, 4, 7, 17, 56, 100, 127, 256, 312, 513, 1000, 4095};
38 for (
int i = 0; i < 12; i++) {
39 unsigned int nTx = tx_counts[i];
43 for (
unsigned int j=0; j<nTx; j++) {
51 std::vector<Txid> vTxid(nTx);
52 for (
unsigned int j=0; j<nTx; j++)
53 vTxid[j] = block.
vtx[j]->GetHash();
61 for (
int att = 1; att < 15; att++) {
63 std::vector<bool> vMatch(nTx,
false);
64 std::vector<Txid> vMatchTxid1;
65 for (
unsigned int j=0; j<nTx; j++) {
66 bool fInclude = m_rng.randbits(att / 2) == 0;
69 vMatchTxid1.push_back(vTxid[j]);
80 unsigned int n = std::min<unsigned int>(nTx, 1 + vMatchTxid1.size()*
nHeight);
88 std::vector<Txid> vMatchTxid2;
89 std::vector<unsigned int> vIndex;
100 for (
int j=0; j<4; j++) {
103 std::vector<Txid> vMatchTxid3;
CPartialMerkleTree(const std::vector< Txid > &vTxid, const std::vector< bool > &vMatch)
Construct a partial merkle tree from a list of transaction ids, and a mask that selects a subset of t...