From 6fac2c55f119070fda1e623c36908018a9148cfe Mon Sep 17 00:00:00 2001 From: Nithish Karthik Date: Fri, 12 Apr 2024 02:04:41 +0530 Subject: [PATCH] only 100 --- src/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.go b/src/main.go index d8dfb18..b276ddb 100644 --- a/src/main.go +++ b/src/main.go @@ -149,10 +149,10 @@ func (pq *PriorityQueue) update(item *Item, value txn.Transaction, priority int) heap.Fix(pq, item.index) } -func GetTop2000() []*txn.Transaction{ +func GetTop() []*txn.Transaction{ pq := GetValidTxns() var txns []*txn.Transaction - for range 2000 { + for range 100 { item := heap.Pop(&pq).(*Item) txns = append(txns, &item.value) } @@ -161,7 +161,7 @@ func GetTop2000() []*txn.Transaction{ func main() { UpdateValidTxns() - txns := GetTop2000() + txns := GetTop() candidateBlock := mining.GetCandidateBlock(txns, true) mining.MineBlock(candidateBlock, OutputFilePath) }