From 1f25116a9101a1f86d50197e8605d01ff3355ed3 Mon Sep 17 00:00:00 2001 From: D-Stacks Date: Thu, 16 Jun 2022 09:17:59 +0200 Subject: [PATCH] fix fmt --- app/appmessage/rpc_notify_block_added.go | 6 +- .../rpc_notify_finality_conflicts.go | 12 ++-- .../rpc_notify_new_block_template.go | 2 +- app/appmessage/rpc_notify_utxos_changed.go | 8 +-- .../rpc_notify_virtual_daa_score_changed.go | 6 +- ...elected_parent_chain_blue_score_changed.go | 8 +-- ...y_virtual_selected_parent_chain_changed.go | 12 ++-- .../rpc_stop_notifying_utxos_changed.go | 6 +- app/rpc/manager.go | 2 +- app/rpc/rpccontext/notificationmanager.go | 56 +++++++++---------- ...irtual_selected_parent_chain_from_block.go | 2 +- app/rpc/rpchandlers/notify_block_added.go | 4 +- .../rpchandlers/notify_finality_conflicts.go | 4 +- .../rpchandlers/notify_new_block_template.go | 4 +- ...notify_pruning_point_utxo_set_overrides.go | 4 +- app/rpc/rpchandlers/notify_utxos_changed.go | 2 +- .../notify_virtual_daa_score_changed.go | 4 +- ...tual_selected_parent_blue_score_changed.go | 4 +- ...ifying_pruning_point_utxo_set_overrides.go | 4 +- .../stop_notifying_utxos_changed.go | 2 +- .../network/rpcclient/rpc_on_block_added.go | 2 +- .../network/rpcclient/rpc_on_chain_changed.go | 4 +- .../rpcclient/rpc_on_finality_conflicts.go | 2 +- .../rpcclient/rpc_on_new_block_template.go | 2 +- .../rpc_on_pruning_point_utxo_set_override.go | 2 +- .../network/rpcclient/rpc_on_utxos_changed.go | 2 +- .../rpc_on_virtual_daa_score_changed.go | 2 +- ...tual_selected_parent_blue_score_changed.go | 2 +- 28 files changed, 85 insertions(+), 85 deletions(-) diff --git a/app/appmessage/rpc_notify_block_added.go b/app/appmessage/rpc_notify_block_added.go index 136b93de2..4e4846d5a 100644 --- a/app/appmessage/rpc_notify_block_added.go +++ b/app/appmessage/rpc_notify_block_added.go @@ -21,7 +21,7 @@ func NewNotifyBlockAddedRequestMessage(id string) *NotifyBlockAddedRequestMessag // its respective RPC message type NotifyBlockAddedResponseMessage struct { baseMessage - Id string + Id string Error *RPCError } @@ -39,7 +39,7 @@ func NewNotifyBlockAddedResponseMessage(id string) *NotifyBlockAddedResponseMess // its respective RPC message type BlockAddedNotificationMessage struct { baseMessage - Id string + Id string Block *RPCBlock } @@ -51,7 +51,7 @@ func (msg *BlockAddedNotificationMessage) Command() MessageCommand { // NewBlockAddedNotificationMessage returns a instance of the message func NewBlockAddedNotificationMessage(block *RPCBlock, id string) *BlockAddedNotificationMessage { return &BlockAddedNotificationMessage{ - Id : id, + Id: id, Block: block, } } diff --git a/app/appmessage/rpc_notify_finality_conflicts.go b/app/appmessage/rpc_notify_finality_conflicts.go index 8e0cc3ddd..b70b5acc2 100644 --- a/app/appmessage/rpc_notify_finality_conflicts.go +++ b/app/appmessage/rpc_notify_finality_conflicts.go @@ -14,14 +14,14 @@ func (msg *NotifyFinalityConflictsRequestMessage) Command() MessageCommand { // NewNotifyFinalityConflictsRequestMessage returns a instance of the message func NewNotifyFinalityConflictsRequestMessage(id string) *NotifyFinalityConflictsRequestMessage { - return &NotifyFinalityConflictsRequestMessage{Id : id} + return &NotifyFinalityConflictsRequestMessage{Id: id} } // NotifyFinalityConflictsResponseMessage is an appmessage corresponding to // its respective RPC message type NotifyFinalityConflictsResponseMessage struct { baseMessage - Id string + Id string Error *RPCError } @@ -32,14 +32,14 @@ func (msg *NotifyFinalityConflictsResponseMessage) Command() MessageCommand { // NewNotifyFinalityConflictsResponseMessage returns a instance of the message func NewNotifyFinalityConflictsResponseMessage(id string) *NotifyFinalityConflictsResponseMessage { - return &NotifyFinalityConflictsResponseMessage{Id : id} + return &NotifyFinalityConflictsResponseMessage{Id: id} } // FinalityConflictNotificationMessage is an appmessage corresponding to // its respective RPC message type FinalityConflictNotificationMessage struct { baseMessage - Id string + Id string ViolatingBlockHash string } @@ -59,7 +59,7 @@ func NewFinalityConflictNotificationMessage(violatingBlockHash string, id string // its respective RPC message type FinalityConflictResolvedNotificationMessage struct { baseMessage - Id string + Id string FinalityBlockHash string } @@ -71,7 +71,7 @@ func (msg *FinalityConflictResolvedNotificationMessage) Command() MessageCommand // NewFinalityConflictResolvedNotificationMessage returns a instance of the message func NewFinalityConflictResolvedNotificationMessage(finalityBlockHash string, id string) *FinalityConflictResolvedNotificationMessage { return &FinalityConflictResolvedNotificationMessage{ - Id : id, + Id: id, FinalityBlockHash: finalityBlockHash, } } diff --git a/app/appmessage/rpc_notify_new_block_template.go b/app/appmessage/rpc_notify_new_block_template.go index f56c7340a..20358855b 100644 --- a/app/appmessage/rpc_notify_new_block_template.go +++ b/app/appmessage/rpc_notify_new_block_template.go @@ -21,7 +21,7 @@ func NewNotifyNewBlockTemplateRequestMessage(id string) *NotifyNewBlockTemplateR // its respective RPC message type NotifyNewBlockTemplateResponseMessage struct { baseMessage - Id string + Id string Error *RPCError } diff --git a/app/appmessage/rpc_notify_utxos_changed.go b/app/appmessage/rpc_notify_utxos_changed.go index 3ea15af20..fa88c5e56 100644 --- a/app/appmessage/rpc_notify_utxos_changed.go +++ b/app/appmessage/rpc_notify_utxos_changed.go @@ -4,7 +4,7 @@ package appmessage // its respective RPC message type NotifyUTXOsChangedRequestMessage struct { baseMessage - Id string + Id string Addresses []string } @@ -23,8 +23,8 @@ func NewNotifyUTXOsChangedRequestMessage(addresses []string, id string) *NotifyU // NotifyUTXOsChangedResponseMessage is an appmessage corresponding to // its respective RPC message type NotifyUTXOsChangedResponseMessage struct { - baseMessage - Id string + baseMessage + Id string Error *RPCError } @@ -42,7 +42,7 @@ func NewNotifyUTXOsChangedResponseMessage(id string) *NotifyUTXOsChangedResponse // its respective RPC message type UTXOsChangedNotificationMessage struct { baseMessage - Id string + Id string Added []*UTXOsByAddressesEntry Removed []*UTXOsByAddressesEntry } diff --git a/app/appmessage/rpc_notify_virtual_daa_score_changed.go b/app/appmessage/rpc_notify_virtual_daa_score_changed.go index ab644df4b..7fbd94266 100644 --- a/app/appmessage/rpc_notify_virtual_daa_score_changed.go +++ b/app/appmessage/rpc_notify_virtual_daa_score_changed.go @@ -21,7 +21,7 @@ func NewNotifyVirtualDaaScoreChangedRequestMessage(id string) *NotifyVirtualDaaS // its respective RPC message type NotifyVirtualDaaScoreChangedResponseMessage struct { baseMessage - Id string + Id string Error *RPCError } @@ -39,7 +39,7 @@ func NewNotifyVirtualDaaScoreChangedResponseMessage(id string) *NotifyVirtualDaa // its respective RPC message type VirtualDaaScoreChangedNotificationMessage struct { baseMessage - Id string + Id string VirtualDaaScore uint64 } @@ -53,7 +53,7 @@ func NewVirtualDaaScoreChangedNotificationMessage( virtualDaaScore uint64, id string) *VirtualDaaScoreChangedNotificationMessage { return &VirtualDaaScoreChangedNotificationMessage{ - Id: id, + Id: id, VirtualDaaScore: virtualDaaScore, } } diff --git a/app/appmessage/rpc_notify_virtual_selected_parent_chain_blue_score_changed.go b/app/appmessage/rpc_notify_virtual_selected_parent_chain_blue_score_changed.go index e6dbf1353..4c315d4f2 100644 --- a/app/appmessage/rpc_notify_virtual_selected_parent_chain_blue_score_changed.go +++ b/app/appmessage/rpc_notify_virtual_selected_parent_chain_blue_score_changed.go @@ -14,14 +14,14 @@ func (msg *NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) Command() // NewNotifyVirtualSelectedParentBlueScoreChangedRequestMessage returns a instance of the message func NewNotifyVirtualSelectedParentBlueScoreChangedRequestMessage(id string) *NotifyVirtualSelectedParentBlueScoreChangedRequestMessage { - return &NotifyVirtualSelectedParentBlueScoreChangedRequestMessage{Id : id} + return &NotifyVirtualSelectedParentBlueScoreChangedRequestMessage{Id: id} } // NotifyVirtualSelectedParentBlueScoreChangedResponseMessage is an appmessage corresponding to // its respective RPC message type NotifyVirtualSelectedParentBlueScoreChangedResponseMessage struct { baseMessage - Id string + Id string Error *RPCError } @@ -39,7 +39,7 @@ func NewNotifyVirtualSelectedParentBlueScoreChangedResponseMessage(id string) *N // its respective RPC message type VirtualSelectedParentBlueScoreChangedNotificationMessage struct { baseMessage - Id string + Id string VirtualSelectedParentBlueScore uint64 } @@ -53,7 +53,7 @@ func NewVirtualSelectedParentBlueScoreChangedNotificationMessage( virtualSelectedParentBlueScore uint64, id string) *VirtualSelectedParentBlueScoreChangedNotificationMessage { return &VirtualSelectedParentBlueScoreChangedNotificationMessage{ - Id : id, + Id: id, VirtualSelectedParentBlueScore: virtualSelectedParentBlueScore, } } diff --git a/app/appmessage/rpc_notify_virtual_selected_parent_chain_changed.go b/app/appmessage/rpc_notify_virtual_selected_parent_chain_changed.go index 02c49c4d5..4cb871d89 100644 --- a/app/appmessage/rpc_notify_virtual_selected_parent_chain_changed.go +++ b/app/appmessage/rpc_notify_virtual_selected_parent_chain_changed.go @@ -4,7 +4,7 @@ package appmessage // its respective RPC message type NotifyVirtualSelectedParentChainChangedRequestMessage struct { baseMessage - Id string + Id string IncludeAcceptedTransactionIDs bool } @@ -18,7 +18,7 @@ func NewNotifyVirtualSelectedParentChainChangedRequestMessage( includeAcceptedTransactionIDs bool, id string) *NotifyVirtualSelectedParentChainChangedRequestMessage { return &NotifyVirtualSelectedParentChainChangedRequestMessage{ - Id : id, + Id: id, IncludeAcceptedTransactionIDs: includeAcceptedTransactionIDs, } } @@ -27,7 +27,7 @@ func NewNotifyVirtualSelectedParentChainChangedRequestMessage( // its respective RPC message type NotifyVirtualSelectedParentChainChangedResponseMessage struct { baseMessage - Id string + Id string Error *RPCError } @@ -38,14 +38,14 @@ func (msg *NotifyVirtualSelectedParentChainChangedResponseMessage) Command() Mes // NewNotifyVirtualSelectedParentChainChangedResponseMessage returns a instance of the message func NewNotifyVirtualSelectedParentChainChangedResponseMessage(id string) *NotifyVirtualSelectedParentChainChangedResponseMessage { - return &NotifyVirtualSelectedParentChainChangedResponseMessage{Id : id} + return &NotifyVirtualSelectedParentChainChangedResponseMessage{Id: id} } // VirtualSelectedParentChainChangedNotificationMessage is an appmessage corresponding to // its respective RPC message type VirtualSelectedParentChainChangedNotificationMessage struct { baseMessage - Id string + Id string RemovedChainBlockHashes []string AddedChainBlockHashes []string AcceptedTransactionIDs []*AcceptedTransactionIDs @@ -61,7 +61,7 @@ func NewVirtualSelectedParentChainChangedNotificationMessage(removedChainBlockHa addedChainBlocks []string, acceptedTransactionIDs []*AcceptedTransactionIDs, id string) *VirtualSelectedParentChainChangedNotificationMessage { return &VirtualSelectedParentChainChangedNotificationMessage{ - Id : id, + Id: id, RemovedChainBlockHashes: removedChainBlockHashes, AddedChainBlockHashes: addedChainBlocks, AcceptedTransactionIDs: acceptedTransactionIDs, diff --git a/app/appmessage/rpc_stop_notifying_utxos_changed.go b/app/appmessage/rpc_stop_notifying_utxos_changed.go index e89cb5d91..5877f1d25 100644 --- a/app/appmessage/rpc_stop_notifying_utxos_changed.go +++ b/app/appmessage/rpc_stop_notifying_utxos_changed.go @@ -4,7 +4,7 @@ package appmessage // its respective RPC message type StopNotifyingUTXOsChangedRequestMessage struct { baseMessage - Id string + Id string Addresses []string } @@ -16,7 +16,7 @@ func (msg *StopNotifyingUTXOsChangedRequestMessage) Command() MessageCommand { // NewStopNotifyingUTXOsChangedRequestMessage returns a instance of the message func NewStopNotifyingUTXOsChangedRequestMessage(addresses []string, id string) *StopNotifyingUTXOsChangedRequestMessage { return &StopNotifyingUTXOsChangedRequestMessage{ - Id: id, + Id: id, Addresses: addresses, } } @@ -25,7 +25,7 @@ func NewStopNotifyingUTXOsChangedRequestMessage(addresses []string, id string) * // its respective RPC message type StopNotifyingUTXOsChangedResponseMessage struct { baseMessage - Id string + Id string Error *RPCError } diff --git a/app/rpc/manager.go b/app/rpc/manager.go index e786460f3..30adc2675 100644 --- a/app/rpc/manager.go +++ b/app/rpc/manager.go @@ -92,7 +92,7 @@ func (m *Manager) notifyBlockAddedToDAG(block *externalapi.DomainBlock) error { if err != nil { return err } - blockAddedNotification := appmessage.NewBlockAddedNotificationMessage(rpcBlock,"") + blockAddedNotification := appmessage.NewBlockAddedNotificationMessage(rpcBlock, "") err = m.context.NotificationManager.NotifyBlockAdded(blockAddedNotification) if err != nil { return err diff --git a/app/rpc/rpccontext/notificationmanager.go b/app/rpc/rpccontext/notificationmanager.go index 967deeaa9..7fd898dc5 100644 --- a/app/rpc/rpccontext/notificationmanager.go +++ b/app/rpc/rpccontext/notificationmanager.go @@ -33,24 +33,24 @@ type UTXOsChangedNotificationAddress struct { type NotificationListener struct { params *dagconfig.Params - propagateBlockAddedNotifications bool - propagateBlockAddedNotificationsId string - propagateVirtualSelectedParentChainChangedNotifications bool - propagateVirtualSelectedParentChainChangedNotificationsId string - propagateFinalityConflictNotifications bool - propagateFinalityConflictNotificationsId string - propagateFinalityConflictResolvedNotifications bool - propagateFinalityConflictResolvedNotificationsId string - propagateUTXOsChangedNotifications bool - propagateUTXOsChangedNotificationsId string - propagateVirtualSelectedParentBlueScoreChangedNotifications bool + propagateBlockAddedNotifications bool + propagateBlockAddedNotificationsId string + propagateVirtualSelectedParentChainChangedNotifications bool + propagateVirtualSelectedParentChainChangedNotificationsId string + propagateFinalityConflictNotifications bool + propagateFinalityConflictNotificationsId string + propagateFinalityConflictResolvedNotifications bool + propagateFinalityConflictResolvedNotificationsId string + propagateUTXOsChangedNotifications bool + propagateUTXOsChangedNotificationsId string + propagateVirtualSelectedParentBlueScoreChangedNotifications bool propagateVirtualSelectedParentBlueScoreChangedNotificationsId string - propagateVirtualDaaScoreChangedNotifications bool - propagateVirtualDaaScoreChangedNotificationsId string - propagatePruningPointUTXOSetOverrideNotifications bool - propagatePruningPointUTXOSetOverrideNotificationsId string - propagateNewBlockTemplateNotifications bool - propagateNewBlockTemplateNotificationsId string + propagateVirtualDaaScoreChangedNotifications bool + propagateVirtualDaaScoreChangedNotificationsId string + propagatePruningPointUTXOSetOverrideNotifications bool + propagatePruningPointUTXOSetOverrideNotificationsId string + propagateNewBlockTemplateNotifications bool + propagateNewBlockTemplateNotificationsId string propagateUTXOsChangedNotificationAddresses map[utxoindex.ScriptPublicKeyString]*UTXOsChangedNotificationAddress includeAcceptedTransactionIDsInVirtualSelectedParentChainChangedNotifications bool @@ -176,9 +176,9 @@ func (nm *NotificationManager) NotifyFinalityConflict(notification *appmessage.F for router, listener := range nm.listeners { if listener.propagateFinalityConflictNotifications { - + notification.Id = listener.propagateFinalityConflictNotificationsId - + err := router.OutgoingRoute().Enqueue(notification) if err != nil { return err @@ -195,9 +195,9 @@ func (nm *NotificationManager) NotifyFinalityConflictResolved(notification *appm for router, listener := range nm.listeners { if listener.propagateFinalityConflictResolvedNotifications { - + notification.Id = listener.propagateFinalityConflictResolvedNotificationsId - + err := router.OutgoingRoute().Enqueue(notification) if err != nil { return err @@ -219,7 +219,7 @@ func (nm *NotificationManager) NotifyUTXOsChanged(utxoChanges *utxoindex.UTXOCha if err != nil { return err } - + notification.Id = listener.propagateUTXOsChangedNotificationsId // Don't send the notification if it's empty @@ -247,9 +247,9 @@ func (nm *NotificationManager) NotifyVirtualSelectedParentBlueScoreChanged( for router, listener := range nm.listeners { if listener.propagateVirtualSelectedParentBlueScoreChangedNotifications { - + notification.Id = listener.propagateVirtualSelectedParentBlueScoreChangedNotificationsId - + err := router.OutgoingRoute().MaybeEnqueue(notification) if err != nil { return err @@ -269,9 +269,9 @@ func (nm *NotificationManager) NotifyVirtualDaaScoreChanged( for router, listener := range nm.listeners { if listener.propagateVirtualDaaScoreChangedNotifications { - + notification.Id = listener.propagateVirtualDaaScoreChangedNotificationsId - + err := router.OutgoingRoute().MaybeEnqueue(notification) if err != nil { return err @@ -291,9 +291,9 @@ func (nm *NotificationManager) NotifyNewBlockTemplate( for router, listener := range nm.listeners { if listener.propagateNewBlockTemplateNotifications { - + notification.Id = listener.propagateNewBlockTemplateNotificationsId - + err := router.OutgoingRoute().Enqueue(notification) if err != nil { return err diff --git a/app/rpc/rpchandlers/get_virtual_selected_parent_chain_from_block.go b/app/rpc/rpchandlers/get_virtual_selected_parent_chain_from_block.go index 28e31422f..61d3cd09f 100644 --- a/app/rpc/rpchandlers/get_virtual_selected_parent_chain_from_block.go +++ b/app/rpc/rpchandlers/get_virtual_selected_parent_chain_from_block.go @@ -27,7 +27,7 @@ func HandleGetVirtualSelectedParentChainFromBlock(context *rpccontext.Context, _ } chainChangedNotification, err := context.ConvertVirtualSelectedParentChainChangesToChainChangedNotificationMessage( - virtualSelectedParentChain, getVirtualSelectedParentChainFromBlockRequest.IncludeAcceptedTransactionIDs, rpccontext.DefaultNotificationId) + virtualSelectedParentChain, getVirtualSelectedParentChainFromBlockRequest.IncludeAcceptedTransactionIDs, rpccontext.DefaultNotificationId) if err != nil { return nil, err } diff --git a/app/rpc/rpchandlers/notify_block_added.go b/app/rpc/rpchandlers/notify_block_added.go index fd3113f68..dcd88f1d7 100644 --- a/app/rpc/rpchandlers/notify_block_added.go +++ b/app/rpc/rpchandlers/notify_block_added.go @@ -8,9 +8,9 @@ import ( // HandleNotifyBlockAdded handles the respectively named RPC command func HandleNotifyBlockAdded(context *rpccontext.Context, router *router.Router, request appmessage.Message) (appmessage.Message, error) { - + notifyBlockAddedRequestMessage := request.(*appmessage.NotifyBlockAddedRequestMessage) - + listener, err := context.NotificationManager.Listener(router) if err != nil { return nil, err diff --git a/app/rpc/rpchandlers/notify_finality_conflicts.go b/app/rpc/rpchandlers/notify_finality_conflicts.go index e7b35f2dd..35410f751 100644 --- a/app/rpc/rpchandlers/notify_finality_conflicts.go +++ b/app/rpc/rpchandlers/notify_finality_conflicts.go @@ -8,9 +8,9 @@ import ( // HandleNotifyFinalityConflicts handles the respectively named RPC command func HandleNotifyFinalityConflicts(context *rpccontext.Context, router *router.Router, request appmessage.Message) (appmessage.Message, error) { - + notifyFinalityConflictsRequest := request.(*appmessage.NotifyFinalityConflictsRequestMessage) - + listener, err := context.NotificationManager.Listener(router) if err != nil { return nil, err diff --git a/app/rpc/rpchandlers/notify_new_block_template.go b/app/rpc/rpchandlers/notify_new_block_template.go index b5bca7d93..85a7d6d76 100644 --- a/app/rpc/rpchandlers/notify_new_block_template.go +++ b/app/rpc/rpchandlers/notify_new_block_template.go @@ -8,9 +8,9 @@ import ( // HandleNotifyNewBlockTemplate handles the respectively named RPC command func HandleNotifyNewBlockTemplate(context *rpccontext.Context, router *router.Router, request appmessage.Message) (appmessage.Message, error) { - + notifyNewBlockTemplateRequest := request.(*appmessage.NotifyNewBlockTemplateRequestMessage) - + listener, err := context.NotificationManager.Listener(router) if err != nil { return nil, err diff --git a/app/rpc/rpchandlers/notify_pruning_point_utxo_set_overrides.go b/app/rpc/rpchandlers/notify_pruning_point_utxo_set_overrides.go index c4278d0cf..e10b66ec1 100644 --- a/app/rpc/rpchandlers/notify_pruning_point_utxo_set_overrides.go +++ b/app/rpc/rpchandlers/notify_pruning_point_utxo_set_overrides.go @@ -8,9 +8,9 @@ import ( // HandleNotifyPruningPointUTXOSetOverrideRequest handles the respectively named RPC command func HandleNotifyPruningPointUTXOSetOverrideRequest(context *rpccontext.Context, router *router.Router, request appmessage.Message) (appmessage.Message, error) { - + notifyPruningPointUTXOSetOverrideRequest := request.(*appmessage.NotifyPruningPointUTXOSetOverrideRequestMessage) - + listener, err := context.NotificationManager.Listener(router) if err != nil { return nil, err diff --git a/app/rpc/rpchandlers/notify_utxos_changed.go b/app/rpc/rpchandlers/notify_utxos_changed.go index fab42b2a6..269dee7b8 100644 --- a/app/rpc/rpchandlers/notify_utxos_changed.go +++ b/app/rpc/rpchandlers/notify_utxos_changed.go @@ -8,7 +8,7 @@ import ( // HandleNotifyUTXOsChanged handles the respectively named RPC command func HandleNotifyUTXOsChanged(context *rpccontext.Context, router *router.Router, request appmessage.Message) (appmessage.Message, error) { - + notifyUTXOsChangedRequest := request.(*appmessage.NotifyUTXOsChangedRequestMessage) if !context.Config.UTXOIndex { diff --git a/app/rpc/rpchandlers/notify_virtual_daa_score_changed.go b/app/rpc/rpchandlers/notify_virtual_daa_score_changed.go index 1798f5d1e..539130421 100644 --- a/app/rpc/rpchandlers/notify_virtual_daa_score_changed.go +++ b/app/rpc/rpchandlers/notify_virtual_daa_score_changed.go @@ -8,9 +8,9 @@ import ( // HandleNotifyVirtualDaaScoreChanged handles the respectively named RPC command func HandleNotifyVirtualDaaScoreChanged(context *rpccontext.Context, router *router.Router, request appmessage.Message) (appmessage.Message, error) { - + notifyVirtualDaaScoreChangedRequest := request.(*appmessage.NotifyVirtualDaaScoreChangedRequestMessage) - + listener, err := context.NotificationManager.Listener(router) if err != nil { return nil, err diff --git a/app/rpc/rpchandlers/notify_virtual_selected_parent_blue_score_changed.go b/app/rpc/rpchandlers/notify_virtual_selected_parent_blue_score_changed.go index ecbfb48c4..27c92d5f2 100644 --- a/app/rpc/rpchandlers/notify_virtual_selected_parent_blue_score_changed.go +++ b/app/rpc/rpchandlers/notify_virtual_selected_parent_blue_score_changed.go @@ -8,9 +8,9 @@ import ( // HandleNotifyVirtualSelectedParentBlueScoreChanged handles the respectively named RPC command func HandleNotifyVirtualSelectedParentBlueScoreChanged(context *rpccontext.Context, router *router.Router, request appmessage.Message) (appmessage.Message, error) { - + notifyVirtualSelectedParentBlueScoreChangedRequest := request.(*appmessage.NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) - + listener, err := context.NotificationManager.Listener(router) if err != nil { return nil, err diff --git a/app/rpc/rpchandlers/stop_notifying_pruning_point_utxo_set_overrides.go b/app/rpc/rpchandlers/stop_notifying_pruning_point_utxo_set_overrides.go index 932cd7bd1..48cab7abf 100644 --- a/app/rpc/rpchandlers/stop_notifying_pruning_point_utxo_set_overrides.go +++ b/app/rpc/rpchandlers/stop_notifying_pruning_point_utxo_set_overrides.go @@ -8,9 +8,9 @@ import ( // HandleStopNotifyingPruningPointUTXOSetOverrideRequest handles the respectively named RPC command func HandleStopNotifyingPruningPointUTXOSetOverrideRequest(context *rpccontext.Context, router *router.Router, request appmessage.Message) (appmessage.Message, error) { - + stopNotifyingPruningPointUTXOSetOverrideRequest := request.(*appmessage.StopNotifyingPruningPointUTXOSetOverrideRequestMessage) - + listener, err := context.NotificationManager.Listener(router) if err != nil { return nil, err diff --git a/app/rpc/rpchandlers/stop_notifying_utxos_changed.go b/app/rpc/rpchandlers/stop_notifying_utxos_changed.go index f4b5d4d5f..3ae09382a 100644 --- a/app/rpc/rpchandlers/stop_notifying_utxos_changed.go +++ b/app/rpc/rpchandlers/stop_notifying_utxos_changed.go @@ -8,7 +8,7 @@ import ( // HandleStopNotifyingUTXOsChanged handles the respectively named RPC command func HandleStopNotifyingUTXOsChanged(context *rpccontext.Context, router *router.Router, request appmessage.Message) (appmessage.Message, error) { - + stopNotifyingUTXOsChangedRequest := request.(*appmessage.StopNotifyingUTXOsChangedRequestMessage) if !context.Config.UTXOIndex { diff --git a/infrastructure/network/rpcclient/rpc_on_block_added.go b/infrastructure/network/rpcclient/rpc_on_block_added.go index 512dd62d0..a2001b58e 100644 --- a/infrastructure/network/rpcclient/rpc_on_block_added.go +++ b/infrastructure/network/rpcclient/rpc_on_block_added.go @@ -2,9 +2,9 @@ package rpcclient import ( "github.com/kaspanet/kaspad/app/appmessage" + "github.com/kaspanet/kaspad/app/rpc/rpccontext" routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" ) // RegisterForBlockAddedNotifications sends an RPC request respective to the function's name and returns the RPC server's response. diff --git a/infrastructure/network/rpcclient/rpc_on_chain_changed.go b/infrastructure/network/rpcclient/rpc_on_chain_changed.go index fd45146e6..af7feb334 100644 --- a/infrastructure/network/rpcclient/rpc_on_chain_changed.go +++ b/infrastructure/network/rpcclient/rpc_on_chain_changed.go @@ -2,9 +2,9 @@ package rpcclient import ( "github.com/kaspanet/kaspad/app/appmessage" + "github.com/kaspanet/kaspad/app/rpc/rpccontext" routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" ) // RegisterForVirtualSelectedParentChainChangedNotifications sends an RPC request respective to the function's name and returns the RPC server's response. @@ -13,7 +13,7 @@ func (c *RPCClient) RegisterForVirtualSelectedParentChainChangedNotifications(in onChainChanged func(notification *appmessage.VirtualSelectedParentChainChangedNotificationMessage)) error { err := c.rpcRouter.outgoingRoute().Enqueue( - appmessage.NewNotifyVirtualSelectedParentChainChangedRequestMessage(includeAcceptedTransactionIDs, rpccontext.DefaultNotificationId)) + appmessage.NewNotifyVirtualSelectedParentChainChangedRequestMessage(includeAcceptedTransactionIDs, rpccontext.DefaultNotificationId)) if err != nil { return err } diff --git a/infrastructure/network/rpcclient/rpc_on_finality_conflicts.go b/infrastructure/network/rpcclient/rpc_on_finality_conflicts.go index 19c13e4a1..e2625e229 100644 --- a/infrastructure/network/rpcclient/rpc_on_finality_conflicts.go +++ b/infrastructure/network/rpcclient/rpc_on_finality_conflicts.go @@ -2,9 +2,9 @@ package rpcclient import ( "github.com/kaspanet/kaspad/app/appmessage" + "github.com/kaspanet/kaspad/app/rpc/rpccontext" routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" ) // RegisterForFinalityConflictsNotifications sends an RPC request respective to the function's name and returns the RPC server's response. diff --git a/infrastructure/network/rpcclient/rpc_on_new_block_template.go b/infrastructure/network/rpcclient/rpc_on_new_block_template.go index 57f7e9126..017dea043 100644 --- a/infrastructure/network/rpcclient/rpc_on_new_block_template.go +++ b/infrastructure/network/rpcclient/rpc_on_new_block_template.go @@ -2,9 +2,9 @@ package rpcclient import ( "github.com/kaspanet/kaspad/app/appmessage" + "github.com/kaspanet/kaspad/app/rpc/rpccontext" routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" ) // RegisterForNewBlockTemplateNotifications sends an RPC request respective to the function's name and returns the RPC server's response. diff --git a/infrastructure/network/rpcclient/rpc_on_pruning_point_utxo_set_override.go b/infrastructure/network/rpcclient/rpc_on_pruning_point_utxo_set_override.go index aca774f18..a7331a1ce 100644 --- a/infrastructure/network/rpcclient/rpc_on_pruning_point_utxo_set_override.go +++ b/infrastructure/network/rpcclient/rpc_on_pruning_point_utxo_set_override.go @@ -2,9 +2,9 @@ package rpcclient import ( "github.com/kaspanet/kaspad/app/appmessage" + "github.com/kaspanet/kaspad/app/rpc/rpccontext" routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" ) // RegisterPruningPointUTXOSetNotifications sends an RPC request respective to the function's name and returns the RPC server's response. diff --git a/infrastructure/network/rpcclient/rpc_on_utxos_changed.go b/infrastructure/network/rpcclient/rpc_on_utxos_changed.go index 313563b55..518784a5b 100644 --- a/infrastructure/network/rpcclient/rpc_on_utxos_changed.go +++ b/infrastructure/network/rpcclient/rpc_on_utxos_changed.go @@ -2,9 +2,9 @@ package rpcclient import ( "github.com/kaspanet/kaspad/app/appmessage" + "github.com/kaspanet/kaspad/app/rpc/rpccontext" routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" ) // RegisterForUTXOsChangedNotifications sends an RPC request respective to the function's name and returns the RPC server's response. diff --git a/infrastructure/network/rpcclient/rpc_on_virtual_daa_score_changed.go b/infrastructure/network/rpcclient/rpc_on_virtual_daa_score_changed.go index 8023146a0..19104b951 100644 --- a/infrastructure/network/rpcclient/rpc_on_virtual_daa_score_changed.go +++ b/infrastructure/network/rpcclient/rpc_on_virtual_daa_score_changed.go @@ -2,9 +2,9 @@ package rpcclient import ( "github.com/kaspanet/kaspad/app/appmessage" + "github.com/kaspanet/kaspad/app/rpc/rpccontext" routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" ) // RegisterForVirtualDaaScoreChangedNotifications sends an RPC request respective to the function's diff --git a/infrastructure/network/rpcclient/rpc_on_virtual_selected_parent_blue_score_changed.go b/infrastructure/network/rpcclient/rpc_on_virtual_selected_parent_blue_score_changed.go index e5c4dad71..e7f953464 100644 --- a/infrastructure/network/rpcclient/rpc_on_virtual_selected_parent_blue_score_changed.go +++ b/infrastructure/network/rpcclient/rpc_on_virtual_selected_parent_blue_score_changed.go @@ -2,9 +2,9 @@ package rpcclient import ( "github.com/kaspanet/kaspad/app/appmessage" + "github.com/kaspanet/kaspad/app/rpc/rpccontext" routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router" "github.com/pkg/errors" - "github.com/kaspanet/kaspad/app/rpc/rpccontext" ) // RegisterForVirtualSelectedParentBlueScoreChangedNotifications sends an RPC request respective to the function's