• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: Commit

Golang implemented sidechain for Bytom


Commit MetaInfo

Revisionaf4d5a2ddec8ba81a841af563e2d3e2a341c4986 (tree)
Time2019-08-21 12:21:59
AuthorHAOYUatHZ <haoyu@prot...>
CommiterHAOYUatHZ

Log Message

rename

Change Summary

Incremental Difference

--- a/toolbar/precog/monitor/monitor.go
+++ b/toolbar/precog/monitor/monitor.go
@@ -198,7 +198,7 @@ func (m *monitor) checkStatusRoutine() {
198198 }
199199 }
200200 log.Info("bestHeight: ", bestHeight)
201- m.savePeerInfos(peers.GetPeerInfos())
201+ m.processPeerInfos(peers.GetPeerInfos())
202202
203203 // TODO:
204204 // msg := struct{ msgs.BlockchainMessage }{&msgs.GetBlockMessage{Height: bestHeight + 1}}
--- a/toolbar/precog/monitor/stats.go
+++ b/toolbar/precog/monitor/stats.go
@@ -49,10 +49,10 @@ func (m *monitor) upSertNode(node *config.Node) error {
4949 }).FirstOrCreate(ormNode).Error
5050 }
5151
52-func (m *monitor) savePeerInfos(peerInfos []*peers.PeerInfo) error {
52+func (m *monitor) processPeerInfos(peerInfos []*peers.PeerInfo) error {
5353 for _, peerInfo := range peerInfos {
5454 dbTx := m.db.Begin()
55- if err := m.savePeerInfo(dbTx, peerInfo); err != nil {
55+ if err := m.processPeerInfo(dbTx, peerInfo); err != nil {
5656 log.Error(err)
5757 dbTx.Rollback()
5858 } else {
@@ -63,7 +63,7 @@ func (m *monitor) savePeerInfos(peerInfos []*peers.PeerInfo) error {
6363 return nil
6464 }
6565
66-func (m *monitor) savePeerInfo(dbTx *gorm.DB, peerInfo *peers.PeerInfo) error {
66+func (m *monitor) processPeerInfo(dbTx *gorm.DB, peerInfo *peers.PeerInfo) error {
6767 xPub := &chainkd.XPub{}
6868 if err := xPub.UnmarshalText([]byte(peerInfo.ID)); err != nil {
6969 return err
Show on old repository browser