Changeset View
Changeset View
Standalone View
Standalone View
src/test/policyestimator_tests.cpp
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | while (blocknum < 200) { | ||||
.Time(GetTime()) | .Time(GetTime()) | ||||
.Priority(0) | .Priority(0) | ||||
.Height(blocknum) | .Height(blocknum) | ||||
.FromTx(tx, &mpool)); | .FromTx(tx, &mpool)); | ||||
txIds[j].push_back(txid); | txIds[j].push_back(txid); | ||||
} | } | ||||
} | } | ||||
// Create blocks where higher fee txs are included more often | // Create blocks where higher fee txs are included more often | ||||
for (int h = 0; h <= blocknum % txIds.size(); h++) { | for (size_t h = 0; h <= blocknum % txIds.size(); h++) { | ||||
// 10/10 blocks add highest fee transactions | // 10/10 blocks add highest fee transactions | ||||
// 9/10 blocks add 2nd highest and so on until ... | // 9/10 blocks add 2nd highest and so on until ... | ||||
// 1/10 blocks add lowest fee transactions | // 1/10 blocks add lowest fee transactions | ||||
size_t i = txIds.size() - h - 1; | size_t i = txIds.size() - h - 1; | ||||
while (txIds[i].size()) { | while (txIds[i].size()) { | ||||
CTransactionRef ptx = mpool.get(txIds[i].back()); | CTransactionRef ptx = mpool.get(txIds[i].back()); | ||||
if (ptx) { | if (ptx) { | ||||
block.push_back(ptx); | block.push_back(ptx); | ||||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |