WIP: Json rpc federation, search/getclaimbyid, and shutdown #76

Merged
jeffreypicard merged 11 commits from json-rpc-federation-and-shutdown into master 2022-12-07 17:01:36 +01:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit ec719e33fa - Show all commits

View file

@ -374,7 +374,7 @@ func (s *Server) addPeer(newPeer *Peer, ping bool, subscribe bool) error {
// This is weird because we're doing grpc and jsonrpc here.
// Do we still want to custom grpc?
log.Warn("Sending peer to NotifierChan")
s.NotifierChan <- newPeer
s.NotifierChan <- peerNotification{newPeer.Address, newPeer.Port}
// Subscribe to all our peers for now
if subscribe {

View file

@ -93,7 +93,6 @@ func TestAddPeer(t *testing.T) {
log.Println(err)
}
}
hubServer.Stop()
var m = &dto.Metric{}
if err := metrics.PeersKnown.Write(m); err != nil {
t.Errorf("Error getting metrics %+v\n", err)
@ -102,6 +101,7 @@ func TestAddPeer(t *testing.T) {
if got != tt.want {
t.Errorf("len(server.PeerServers) = %d, want %d\n", got, tt.want)
}
hubServer.Stop()
})
}