clusterlin: fix type to count dependencies
This commit is contained in:
1 parent
a7c29df0e5
commit
666b37970f
1 file changed
+2
-2
@@ -845,14 +845,14 @@ private:
|
|||||||
auto& bottom_chunk = m_tx_data[bottom_rep];
|
auto& bottom_chunk = m_tx_data[bottom_rep];
|
||||||
Assume(bottom_chunk.chunk_rep == bottom_rep);
|
Assume(bottom_chunk.chunk_rep == bottom_rep);
|
||||||
// Count the number of dependencies between bottom_chunk and top_chunk.
|
// Count the number of dependencies between bottom_chunk and top_chunk.
|
||||||
TxIdx num_deps{0};
|
unsigned num_deps{0};
|
||||||
for (auto tx : top_chunk.chunk_setinfo.transactions) {
|
for (auto tx : top_chunk.chunk_setinfo.transactions) {
|
||||||
auto& tx_data = m_tx_data[tx];
|
auto& tx_data = m_tx_data[tx];
|
||||||
num_deps += (tx_data.children & bottom_chunk.chunk_setinfo.transactions).Count();
|
num_deps += (tx_data.children & bottom_chunk.chunk_setinfo.transactions).Count();
|
||||||
}
|
}
|
||||||
if (num_deps == 0) return TxIdx(-1);
|
if (num_deps == 0) return TxIdx(-1);
|
||||||
// Uniformly randomly pick one of them and activate it.
|
// Uniformly randomly pick one of them and activate it.
|
||||||
TxIdx pick = m_rng.randrange(num_deps);
|
unsigned pick = m_rng.randrange(num_deps);
|
||||||
for (auto tx : top_chunk.chunk_setinfo.transactions) {
|
for (auto tx : top_chunk.chunk_setinfo.transactions) {
|
||||||
auto& tx_data = m_tx_data[tx];
|
auto& tx_data = m_tx_data[tx];
|
||||||
auto intersect = tx_data.children & bottom_chunk.chunk_setinfo.transactions;
|
auto intersect = tx_data.children & bottom_chunk.chunk_setinfo.transactions;
|
||||||
|
|||||||
Reference in new issue
Block a user