Skip to content

Commit b5a80b3

Browse files
authored
add glog lvl 1 logging for validate transactions (#1466)
1 parent 5d620d2 commit b5a80b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/pos_mempool.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,8 @@ func (mp *PosMempool) validateTransactions() error {
806806
if !mp.IsRunning() {
807807
return nil
808808
}
809+
glog.V(1).Infof("PosMempool.validateTransactions: Starting transaction validation...")
810+
currTime := time.Now()
809811

810812
// We hold a read-lock on the mempool to get the transactions and the latest block view.
811813
mp.RLock()
@@ -876,6 +878,8 @@ func (mp *PosMempool) validateTransactions() error {
876878

877879
// Increment the augmentedLatestBlockViewSequenceNumber.
878880
atomic.AddInt64(&mp.augmentedLatestBlockViewSequenceNumber, 1)
881+
// Log the time taken to validate the transactions.
882+
glog.V(1).Infof("PosMempool.validateTransactions: Finished transaction validation in %v", time.Since(currTime))
879883

880884
return nil
881885
}

0 commit comments

Comments
 (0)