diff --git a/app/models/alert_message_freeze_utxo.go b/app/models/alert_message_freeze_utxo.go index 5a41ad8..5e03f1f 100644 --- a/app/models/alert_message_freeze_utxo.go +++ b/app/models/alert_message_freeze_utxo.go @@ -42,10 +42,10 @@ func (f *Fund) Serialize() []byte { // Read reads the message func (a *AlertMessageFreezeUtxo) Read(raw []byte) error { if len(raw) < 57 { - return fmt.Errorf("freeze alert is less than 57 bytes, got %d bytes", len(raw)) + return fmt.Errorf("freeze alert is less than 57 bytes, got %d bytes; raw: %x", len(raw), raw) } if len(raw)%57 != 0 { - return fmt.Errorf("freeze alert is not a multiple of 57 bytes, got %d bytes", len(raw)) + return fmt.Errorf("freeze alert is not a multiple of 57 bytes, got %d bytes; raw: %x", len(raw), raw) } fundCount := len(raw) / 57 funds := []models.Fund{} diff --git a/app/p2p/server.go b/app/p2p/server.go index cf15fb6..727c53d 100644 --- a/app/p2p/server.go +++ b/app/p2p/server.go @@ -82,9 +82,9 @@ func NewServer(o ServerOptions) (*Server, error) { // Print out the peer ID and addresses o.Config.Services.Log.Debugf("peer ID: %s", h.ID().String()) - o.Config.Services.Log.Debug("connect to me on:") + o.Config.Services.Log.Info("connect to me on:") for _, addr := range h.Addrs() { - o.Config.Services.Log.Debugf(" %s/p2p/%s", addr, h.ID().String()) + o.Config.Services.Log.Infof(" %s/p2p/%s", addr, h.ID().String()) } // Return the server @@ -267,7 +267,7 @@ func (s *Server) discoverPeers(ctx context.Context, tn []string, routingDiscover // Look for others who have announced and attempt to connect to them connected := 0 - for connected < 7 { + for connected < 2 { for _, topicName := range tn { s.config.Services.Log.Debugf("searching for peers for topic %s..\n", topicName) diff --git a/hack/publish.go b/hack/publish.go index c7583ea..149e045 100644 --- a/hack/publish.go +++ b/hack/publish.go @@ -60,7 +60,7 @@ func main() { a = InfoAlert(*sequenceNumber, "Testing block invalidation on testnet of 00000000000439a2c310b4e457f7e36f51c25931ccda8d512aeb2300587bcd5d", model.WithAllDependencies(_appConfig)) case models.AlertTypeInvalidateBlock: - a = InvalidateBlockAlert(*sequenceNumber, *blockHash, model.WithAllDependencies(_appConfig)) + a = invalidateBlockAlert(*sequenceNumber, *blockHash, model.WithAllDependencies(_appConfig)) case models.AlertTypeBanPeer: //a = BanPeerAlert(*sequenceNumber, *peer) case models.AlertTypeUnbanPeer: @@ -244,8 +244,8 @@ func UnbanPeerAlert(seq uint, peer string) alert.Alert { return a } */ -// InvalidateBlockAlert creates an invalidate block alert -func InvalidateBlockAlert(seq uint, blockHash string, opts ...model.Options) *models.AlertMessage { +// invalidateBlockAlert creates an invalidate block alert +func invalidateBlockAlert(seq uint, blockHash string, opts ...model.Options) *models.AlertMessage { hash, err := hex.DecodeString(blockHash) if err != nil { panic(err)