From bfbd7780d0e4741c0987c7617bd42e8c84968b1d Mon Sep 17 00:00:00 2001 From: Mikelle Date: Wed, 1 May 2024 19:39:16 +0200 Subject: [PATCH] refactor: changed 10000 to timeDiff in real-bidder --- p2p/integrationtest/real-bidder/main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/p2p/integrationtest/real-bidder/main.go b/p2p/integrationtest/real-bidder/main.go index d68dea43b..3f4daa9a6 100644 --- a/p2p/integrationtest/real-bidder/main.go +++ b/p2p/integrationtest/real-bidder/main.go @@ -193,14 +193,18 @@ func main() { bundleEnd = len(currentBlock.txns) - 1 } + min := 1000 + max := 10000 + startTimeDiff := rand.Intn(max-min+1) + min + endTimeDiff := rand.Intn(max-min+1) + min err = sendBid( bidderClient, logger, rpcClient, currentBlock.txns[bundleStart:bundleEnd], currentBlock.blockNum, - (time.Now().UnixMilli())-10000, - (time.Now().UnixMilli())+10000, + (time.Now().UnixMilli())-int64(startTimeDiff), + (time.Now().UnixMilli())+int64(endTimeDiff), ) if err != nil { logger.Error("failed to send bid", "err", err)