• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: Commit

Golang implemented sidechain for Bytom


Commit MetaInfo

Revision653699f66db5297300fb46596206e66288abd4d5 (tree)
Time2019-06-27 16:50:32
AuthorHAOYUatHZ <haoyu@prot...>
CommiterHAOYUatHZ

Log Message

clean up

Change Summary

Incremental Difference

--- a/api/api.go
+++ b/api/api.go
@@ -114,7 +114,6 @@ type API struct {
114114 blockProposer *blockproposer.BlockProposer
115115 notificationMgr *websocket.WSNotificationManager
116116 eventDispatcher *event.Dispatcher
117- fedInfo *FedInfo
118117 }
119118
120119 func (a *API) initServer(config *cfg.Config) {
@@ -188,7 +187,6 @@ func NewAPI(sync NetSync, wallet *wallet.Wallet, blockProposer *blockproposer.Bl
188187 blockProposer: blockProposer,
189188 eventDispatcher: dispatcher,
190189 notificationMgr: notificationMgr,
191- fedInfo: &FedInfo{config.Federation.IsMember, config.Federation.Port},
192190 }
193191 api.buildHandler()
194192 api.initServer(config)
--- a/api/nodeinfo.go
+++ b/api/nodeinfo.go
@@ -52,16 +52,6 @@ func (a *API) GetNodeInfo() *NetInfo {
5252 return info
5353 }
5454
55-type FedInfo struct {
56- IsMember bool `json:"is_member"`
57- Port uint64 `json:"port"`
58-}
59-
60-// GetFedInfo return federation information
61-func (a *API) GetFedInfo() *FedInfo {
62- return a.fedInfo
63-}
64-
6555 // return the currently connected peers with net address
6656 func (a *API) getPeerInfoByAddr(addr string) *peers.PeerInfo {
6757 peerInfos := a.sync.GetPeerInfos()
--- a/config/config.go
+++ b/config/config.go
@@ -203,10 +203,8 @@ type WebsocketConfig struct {
203203 }
204204
205205 type FederationConfig struct {
206- Xpubs []chainkd.XPub `json:"xpubs"`
207- Quorum int `json:"quorum"`
208- IsMember bool `json:"is_member"`
209- Port uint64 `json:"port"`
206+ Xpubs []chainkd.XPub `json:"xpubs"`
207+ Quorum int `json:"quorum"`
210208 }
211209
212210 // Default configurable rpc's auth parameters.
@@ -245,9 +243,7 @@ func DefaultFederationConfig() *FederationConfig {
245243 Xpubs: []chainkd.XPub{
246244 xpub("50ef22b3a3fca7bc08916187cc9ec2f4005c9c6b1353aa1decbd4be3f3bb0fbe1967589f0d9dec13a388c0412002d2c267bdf3b920864e1ddc50581be5604ce1"),
247245 },
248- Quorum: 1,
249- IsMember: false,
250- Port: 3000,
246+ Quorum: 1,
251247 }
252248 }
253249
Show on old repository browser