Commit 16b438fd authored by duanjinfei's avatar duanjinfei

add time print

parent a715e7c0
...@@ -135,6 +135,7 @@ func signedTxFunc() (*types.Transaction, error) { ...@@ -135,6 +135,7 @@ func signedTxFunc() (*types.Transaction, error) {
for { for {
select { select {
case t := <-tran: case t := <-tran:
startTime := time.Now()
txData := types.LegacyTx{ txData := types.LegacyTx{
Nonce: t.config.Nonce.Uint64(), Nonce: t.config.Nonce.Uint64(),
To: &t.receivedAddr, To: &t.receivedAddr,
...@@ -153,6 +154,7 @@ func signedTxFunc() (*types.Transaction, error) { ...@@ -153,6 +154,7 @@ func signedTxFunc() (*types.Transaction, error) {
txcache.Add(signedTx.Hash().Hex(), t.sender.Hex()) txcache.Add(signedTx.Hash().Hex(), t.sender.Hex())
tranArr = append(tranArr, signedTx) tranArr = append(tranArr, signedTx)
atomic.AddInt32(&batchSignCount, 1) atomic.AddInt32(&batchSignCount, 1)
log.Info("Sign since time: %d ms", time.Since(startTime).Milliseconds())
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment