mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-21 14:26:45 +00:00

* [NOD-1404] Remove most of the notification manager to fix a deadlock. * [NOD-1404] Rename a couple of fields. * [NOD-1404] Fix merge errors. * [NOD-1404] Remove most of the notification manager to fix a deadlock (#935) * [NOD-1404] Remove most of the notification manager to fix a deadlock. * [NOD-1404] Rename a couple of fields.
21 lines
717 B
Go
21 lines
717 B
Go
package rpchandlers
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/app/appmessage"
|
|
"github.com/kaspanet/kaspad/app/rpc/rpccontext"
|
|
"github.com/kaspanet/kaspad/infrastructure/network/netadapter/router"
|
|
)
|
|
|
|
// HandleNotifyFinalityConflicts handles the respectively named RPC command
|
|
func HandleNotifyFinalityConflicts(context *rpccontext.Context, router *router.Router, _ appmessage.Message) (appmessage.Message, error) {
|
|
listener, err := context.NotificationManager.Listener(router)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
listener.PropagateFinalityConflictNotifications()
|
|
listener.PropagateFinalityConflictResolvedNotifications()
|
|
|
|
response := appmessage.NewNotifyFinalityConflictsResponseMessage()
|
|
return response, nil
|
|
}
|