• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: Commit

Golang implemented sidechain for Bytom


Commit MetaInfo

Revisionf1e14d9e05a020e449f627f1f3c63f33fc7596ac (tree)
Time2019-06-27 12:25:01
Authorpaladz <453256728@qq.c...>
Commiterpaladz

Log Message

add more test data

Change Summary

Incremental Difference

--- a/protocol/protocol.go
+++ b/protocol/protocol.go
@@ -5,12 +5,12 @@ import (
55
66 log "github.com/sirupsen/logrus"
77
8+ "github.com/vapor/common"
89 "github.com/vapor/config"
910 "github.com/vapor/event"
1011 "github.com/vapor/protocol/bc"
1112 "github.com/vapor/protocol/bc/types"
1213 "github.com/vapor/protocol/state"
13- "github.com/vapor/common"
1414 )
1515
1616 const maxProcessBlockChSize = 1024
--- a/protocol/state/blockindex.go
+++ b/protocol/state/blockindex.go
@@ -2,6 +2,7 @@ package state
22
33 import (
44 "errors"
5+ "fmt"
56 "sort"
67 "sync"
78
@@ -187,4 +188,5 @@ func (bi *BlockIndex) SetMainChain(node *BlockNode) {
187188 bi.mainChain[node.Height] = node
188189 node = node.Parent
189190 }
191+ fmt.Println("total number of block====================", len(bi.index))
190192 }
Show on old repository browser