mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-24 06:25:55 +00:00
fix fmt and linting
This commit is contained in:
parent
e9f7169d99
commit
ee09eb568a
@ -1,5 +1,7 @@
|
|||||||
package appmessage
|
package appmessage
|
||||||
|
|
||||||
|
// ModifyNotifyingAddressesTxsRequestMessage is an appmessage corresponding to
|
||||||
|
// its respective RPC message
|
||||||
type ModifyNotifyingAddressesTxsRequestMessage struct {
|
type ModifyNotifyingAddressesTxsRequestMessage struct {
|
||||||
baseMessage
|
baseMessage
|
||||||
AddAddresses []string
|
AddAddresses []string
|
||||||
@ -41,7 +43,7 @@ func (msg *ModifyNotifyingAddressesTxsResponseMessage) Command() MessageCommand
|
|||||||
return CmdModifyNotifyingAddressesTxsResponseMessage
|
return CmdModifyNotifyingAddressesTxsResponseMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewModifyNotifyingAddressesTxsesponseMessage returns a instance of the message
|
// NewModifyNotifyingAddressesTxsResponseMessage returns a instance of the message
|
||||||
func NewModifyNotifyingAddressesTxsResponseMessage() *NotifyAddressesTxsResponseMessage {
|
func NewModifyNotifyingAddressesTxsResponseMessage() *NotifyAddressesTxsResponseMessage {
|
||||||
return &NotifyAddressesTxsResponseMessage{}
|
return &NotifyAddressesTxsResponseMessage{}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package appmessage
|
package appmessage
|
||||||
|
|
||||||
|
// ModifyNotifyingTxsConfirmationChangedRequestMessage is an appmessage corresponding to
|
||||||
|
// its respective RPC message
|
||||||
type ModifyNotifyingTxsConfirmationChangedRequestMessage struct {
|
type ModifyNotifyingTxsConfirmationChangedRequestMessage struct {
|
||||||
baseMessage
|
baseMessage
|
||||||
AddTxIDs []string
|
AddTxIDs []string
|
||||||
@ -36,7 +38,7 @@ func (msg *ModifyNotifyingTxsConfirmationChangedResponseMessage) Command() Messa
|
|||||||
return CmdModifyNotifyingTxsConfirmationChangedResponseMessage
|
return CmdModifyNotifyingTxsConfirmationChangedResponseMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewModifyNotifyingTXChangedResponseMessage returns a instance of the message
|
// NewModifyNotifyingTxsChangedResponseMessage returns a instance of the message
|
||||||
func NewModifyNotifyingTxsChangedResponseMessage() *NotifyTxsConfirmationChangedResponseMessage {
|
func NewModifyNotifyingTxsChangedResponseMessage() *NotifyTxsConfirmationChangedResponseMessage {
|
||||||
return &NotifyTxsConfirmationChangedResponseMessage{}
|
return &NotifyTxsConfirmationChangedResponseMessage{}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package appmessage
|
package appmessage
|
||||||
|
|
||||||
// NotifyAddressesTxsRequestMessage is an appmessage corresponding to
|
// NotifyAddressesTxsRequestMessage is an appmessage corresponding to
|
||||||
@ -41,7 +40,7 @@ func (msg *NotifyAddressesTxsResponseMessage) Command() MessageCommand {
|
|||||||
return CmdNotifyAddressesTxsResponseMessage
|
return CmdNotifyAddressesTxsResponseMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewNotifyTXChangedResponseMessage returns a instance of the message
|
// NewNotifyAddressesTxsResponseMessage returns a instance of the message
|
||||||
func NewNotifyAddressesTxsResponseMessage() *NotifyAddressesTxsResponseMessage {
|
func NewNotifyAddressesTxsResponseMessage() *NotifyAddressesTxsResponseMessage {
|
||||||
return &NotifyAddressesTxsResponseMessage{}
|
return &NotifyAddressesTxsResponseMessage{}
|
||||||
}
|
}
|
||||||
@ -54,7 +53,6 @@ type AddressesTxsNotificationMessage struct {
|
|||||||
Pending *TxEntriesByAddresses
|
Pending *TxEntriesByAddresses
|
||||||
Confirmed *TxEntriesByAddresses
|
Confirmed *TxEntriesByAddresses
|
||||||
Unconfirmed *TxEntriesByAddresses
|
Unconfirmed *TxEntriesByAddresses
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Command returns the protocol command string for the message
|
// Command returns the protocol command string for the message
|
||||||
|
|||||||
@ -36,7 +36,7 @@ func (msg *NotifyTxsConfirmationChangedResponseMessage) Command() MessageCommand
|
|||||||
return CmdNotifyTxsConfirmationChangedResponseMessage
|
return CmdNotifyTxsConfirmationChangedResponseMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewNotifyTXChangedResponseMessage returns a instance of the message
|
// NewNotifyTxsChangedResponseMessage returns a instance of the message
|
||||||
func NewNotifyTxsChangedResponseMessage() *NotifyTxsConfirmationChangedResponseMessage {
|
func NewNotifyTxsChangedResponseMessage() *NotifyTxsConfirmationChangedResponseMessage {
|
||||||
return &NotifyTxsConfirmationChangedResponseMessage{}
|
return &NotifyTxsConfirmationChangedResponseMessage{}
|
||||||
}
|
}
|
||||||
@ -49,7 +49,6 @@ type TxsConfirmationChangedNotificationMessage struct {
|
|||||||
Pending []*TxIDConfirmationsPair
|
Pending []*TxIDConfirmationsPair
|
||||||
Confirmed []*TxIDConfirmationsPair
|
Confirmed []*TxIDConfirmationsPair
|
||||||
UnconfirmedTxIds []string
|
UnconfirmedTxIds []string
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Command returns the protocol command string for the message
|
// Command returns the protocol command string for the message
|
||||||
@ -64,6 +63,6 @@ func NewTxsChangedNotificationMessage(requiredConfirmations uint32, pending []*T
|
|||||||
RequiredConfirmations: requiredConfirmations,
|
RequiredConfirmations: requiredConfirmations,
|
||||||
Pending: pending,
|
Pending: pending,
|
||||||
Confirmed: confirmed,
|
Confirmed: confirmed,
|
||||||
UnconfirmedTxIds : unconfirmedTxIds ,
|
UnconfirmedTxIds: unconfirmedTxIds,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,7 +55,6 @@ func (x *ModifyNotifyingTxsConfirmationChangedResponseMessage) toAppMessage() (a
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (x *KaspadMessage_ModifyNotifyingTxsConfirmationChangedResponse) fromAppMessage(message *appmessage.ModifyNotifyingTxsConfirmationChangedResponseMessage) error {
|
func (x *KaspadMessage_ModifyNotifyingTxsConfirmationChangedResponse) fromAppMessage(message *appmessage.ModifyNotifyingTxsConfirmationChangedResponseMessage) error {
|
||||||
var err *RPCError
|
var err *RPCError
|
||||||
if message.Error != nil {
|
if message.Error != nil {
|
||||||
|
|||||||
@ -14,7 +14,7 @@ func (x *KaspadMessage_NotifyAddressesTxsRequest) toAppMessage() (appmessage.Mes
|
|||||||
|
|
||||||
func (x *KaspadMessage_NotifyAddressesTxsRequest) fromAppMessage(message *appmessage.NotifyAddressesTxsRequestMessage) error {
|
func (x *KaspadMessage_NotifyAddressesTxsRequest) fromAppMessage(message *appmessage.NotifyAddressesTxsRequestMessage) error {
|
||||||
x.NotifyAddressesTxsRequest = &NotifyAddressesTxsRequestMessage{
|
x.NotifyAddressesTxsRequest = &NotifyAddressesTxsRequestMessage{
|
||||||
Addresses : message.Addresses,
|
Addresses: message.Addresses,
|
||||||
RequiredConfirmations: message.RequiredConfirmations,
|
RequiredConfirmations: message.RequiredConfirmations,
|
||||||
IncludePending: message.IncludePending,
|
IncludePending: message.IncludePending,
|
||||||
IncludeSending: message.IncludeSending,
|
IncludeSending: message.IncludeSending,
|
||||||
@ -28,7 +28,7 @@ func (x *NotifyAddressesTxsRequestMessage) toAppMessage() (appmessage.Message, e
|
|||||||
return nil, errors.Wrapf(errorNil, "NotifyAddressesTxsRequestMessage is nil")
|
return nil, errors.Wrapf(errorNil, "NotifyAddressesTxsRequestMessage is nil")
|
||||||
}
|
}
|
||||||
return &appmessage.NotifyAddressesTxsRequestMessage{
|
return &appmessage.NotifyAddressesTxsRequestMessage{
|
||||||
Addresses : x.Addresses,
|
Addresses: x.Addresses,
|
||||||
RequiredConfirmations: x.RequiredConfirmations,
|
RequiredConfirmations: x.RequiredConfirmations,
|
||||||
IncludePending: x.IncludePending,
|
IncludePending: x.IncludePending,
|
||||||
IncludeSending: x.IncludeSending,
|
IncludeSending: x.IncludeSending,
|
||||||
@ -122,7 +122,6 @@ func (x *AddressesTxsNotificationMessage) toAppMessage() (appmessage.Message, er
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (x *TxEntriesByAddresses) toAppMessage() (*appmessage.TxEntriesByAddresses, error) {
|
func (x *TxEntriesByAddresses) toAppMessage() (*appmessage.TxEntriesByAddresses, error) {
|
||||||
if x == nil {
|
if x == nil {
|
||||||
return nil, errors.Wrapf(errorNil, "TxEntriesByAddresses is nil")
|
return nil, errors.Wrapf(errorNil, "TxEntriesByAddresses is nil")
|
||||||
@ -146,7 +145,6 @@ func (x *TxEntriesByAddresses) toAppMessage() (*appmessage.TxEntriesByAddresses,
|
|||||||
received[i] = entry
|
received[i] = entry
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return &appmessage.TxEntriesByAddresses{
|
return &appmessage.TxEntriesByAddresses{
|
||||||
Sent: sent,
|
Sent: sent,
|
||||||
Received: received,
|
Received: received,
|
||||||
|
|||||||
@ -88,7 +88,7 @@ func (x *KaspadMessage_TxsConfirmationChangedNotification) fromAppMessage(messag
|
|||||||
RequiredConfirmations: message.RequiredConfirmations,
|
RequiredConfirmations: message.RequiredConfirmations,
|
||||||
Pending: pending,
|
Pending: pending,
|
||||||
Confirmed: confirmed,
|
Confirmed: confirmed,
|
||||||
UnconfirmedTxIds : message.UnconfirmedTxIds ,
|
UnconfirmedTxIds: message.UnconfirmedTxIds,
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user