From f1a5c3fe667519e47357433c25403efba9e5a223 Mon Sep 17 00:00:00 2001 From: Lazy Nina Date: Tue, 8 Jul 2025 17:52:34 -0400 Subject: [PATCH] add glog lvl 1 logging for validate transactions --- lib/pos_mempool.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/pos_mempool.go b/lib/pos_mempool.go index b2217c121..9c55b9080 100644 --- a/lib/pos_mempool.go +++ b/lib/pos_mempool.go @@ -806,6 +806,8 @@ func (mp *PosMempool) validateTransactions() error { if !mp.IsRunning() { return nil } + glog.V(1).Infof("PosMempool.validateTransactions: Starting transaction validation...") + currTime := time.Now() // We hold a read-lock on the mempool to get the transactions and the latest block view. mp.RLock() @@ -876,6 +878,8 @@ func (mp *PosMempool) validateTransactions() error { // Increment the augmentedLatestBlockViewSequenceNumber. atomic.AddInt64(&mp.augmentedLatestBlockViewSequenceNumber, 1) + // Log the time taken to validate the transactions. + glog.V(1).Infof("PosMempool.validateTransactions: Finished transaction validation in %v", time.Since(currTime)) return nil }