Skip to content

Commit

Permalink
Deleted notification go routine for new blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
AL-CT committed Jan 8, 2025
1 parent 9c9bb12 commit c0fa93e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
2 changes: 0 additions & 2 deletions api/bfgapi/bfgapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ type BTCFinalityByKeystonesResponse struct {

type BTCFinalityNotification struct{}

type BTCNewBlockNotification struct{}

type L2KeystonesNotification struct{}

type PopTx struct {
Expand Down
15 changes: 0 additions & 15 deletions service/bfg/bfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -1336,20 +1336,6 @@ func (s *Server) handleBtcFinalityNotification() {
s.mtx.Unlock()
}

func (s *Server) handleBtcBlockNotification() {
log.Tracef("handleBtcBlockNotification")
defer log.Tracef("handleBtcBlockNotification exit")

s.mtx.Lock()
for _, bws := range s.sessions {
if _, ok := bws.notify[notifyBtcBlocks]; !ok {
continue
}
go writeNotificationResponse(bws, &bfgapi.BTCNewBlockNotification{})
}
s.mtx.Unlock()
}

func (s *Server) handleL2KeystonesNotification() {
log.Tracef("handleL2KeystonesNotification")
defer log.Tracef("handleL2KeystonesNotification exit")
Expand Down Expand Up @@ -1465,7 +1451,6 @@ func (s *Server) handleStateUpdates(table string, action string, payload, payloa
// will change
if heightAfter > heightBefore {
go s.handleBtcFinalityNotification()
go s.handleBtcBlockNotification()
}

s.mtx.Lock()
Expand Down

0 comments on commit c0fa93e

Please sign in to comment.