• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: Commit

Golang implemented sidechain for Bytom


Commit MetaInfo

Revision23e2515bb24115ca69f7ef413ddee7b46cceea3b (tree)
Time2019-06-26 21:05:55
Authorpaladz <453256728@qq.c...>
Commiterpaladz

Log Message

add log

Change Summary

Incremental Difference

--- a/protocol/validation/block.go
+++ b/protocol/validation/block.go
@@ -1,6 +1,7 @@
11 package validation
22
33 import (
4+ "fmt"
45 "time"
56
67 log "github.com/sirupsen/logrus"
@@ -88,6 +89,7 @@ func ValidateBlock(b *bc.Block, parent *types.BlockHeader) error {
8889 coinbaseAmount := consensus.BlockSubsidy(b.BlockHeader.Height)
8990 b.TransactionStatus = bc.NewTransactionStatus()
9091
92+ start := time.Now()
9193 validateResults := ValidateTxs(b.Transactions, b)
9294 for i, validateResult := range validateResults {
9395 if !validateResult.gasStatus.GasValid {
@@ -102,6 +104,8 @@ func ValidateBlock(b *bc.Block, parent *types.BlockHeader) error {
102104 return errOverBlockLimit
103105 }
104106 }
107+ end := time.Now()
108+ fmt.Println("validate tx part spend time: ", end.Sub(start))
105109
106110 if err := checkCoinbaseAmount(b, coinbaseAmount); err != nil {
107111 return err
Show on old repository browser