From 3c94c86af39f63452d71ef3e637989bf617e1299 Mon Sep 17 00:00:00 2001 From: D-Stacks Date: Mon, 10 Oct 2022 14:51:10 +0200 Subject: [PATCH] fix fmt and linting --- .../rpcclient/rpc_get_coin_supply copy.go | 20 ------------------- .../rpcclient/rpc_get_tx_confirmations.go | 2 +- .../network/rpcclient/rpc_get_txs.go | 1 - .../rpcclient/rpc_get_txs_confirmations.go | 3 +-- 4 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 infrastructure/network/rpcclient/rpc_get_coin_supply copy.go diff --git a/infrastructure/network/rpcclient/rpc_get_coin_supply copy.go b/infrastructure/network/rpcclient/rpc_get_coin_supply copy.go deleted file mode 100644 index 92b8f8c47..000000000 --- a/infrastructure/network/rpcclient/rpc_get_coin_supply copy.go +++ /dev/null @@ -1,20 +0,0 @@ -package rpcclient - -import "github.com/kaspanet/kaspad/app/appmessage" - -// GetCoinSupply sends an RPC request respective to the function's name and returns the RPC server's response -func (c *RPCClient) GetCoinSupply() (*appmessage.GetCoinSupplyResponseMessage, error) { - err := c.rpcRouter.outgoingRoute().Enqueue(appmessage.NewGetCoinSupplyRequestMessage()) - if err != nil { - return nil, err - } - response, err := c.route(appmessage.CmdGetCoinSupplyResponseMessage).DequeueWithTimeout(c.timeout) - if err != nil { - return nil, err - } - geCoinSupplyResponse := response.(*appmessage.GetCoinSupplyResponseMessage) - if geCoinSupplyResponse.Error != nil { - return nil, c.convertRPCError(geCoinSupplyResponse.Error) - } - return geCoinSupplyResponse, nil -} diff --git a/infrastructure/network/rpcclient/rpc_get_tx_confirmations.go b/infrastructure/network/rpcclient/rpc_get_tx_confirmations.go index 6be7147ae..d165db9d9 100644 --- a/infrastructure/network/rpcclient/rpc_get_tx_confirmations.go +++ b/infrastructure/network/rpcclient/rpc_get_tx_confirmations.go @@ -2,7 +2,7 @@ package rpcclient import "github.com/kaspanet/kaspad/app/appmessage" -// GetTx sends an RPC request respective to the function's name and returns the RPC server's response +// GetTxConfirmations sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetTxConfirmations(txID string) (*appmessage.GetTxConfirmationsResponseMessage, error) { err := c.rpcRouter.outgoingRoute().Enqueue(appmessage.NewGetTxConfirmationsRequest(txID)) if err != nil { diff --git a/infrastructure/network/rpcclient/rpc_get_txs.go b/infrastructure/network/rpcclient/rpc_get_txs.go index 7c5ff01d7..4d7058358 100644 --- a/infrastructure/network/rpcclient/rpc_get_txs.go +++ b/infrastructure/network/rpcclient/rpc_get_txs.go @@ -18,4 +18,3 @@ func (c *RPCClient) GetTxs(txIDs []string) (*appmessage.GetTxsResponseMessage, e } return getTxsResponse, nil } - diff --git a/infrastructure/network/rpcclient/rpc_get_txs_confirmations.go b/infrastructure/network/rpcclient/rpc_get_txs_confirmations.go index 3905770b3..007feaa88 100644 --- a/infrastructure/network/rpcclient/rpc_get_txs_confirmations.go +++ b/infrastructure/network/rpcclient/rpc_get_txs_confirmations.go @@ -2,7 +2,7 @@ package rpcclient import "github.com/kaspanet/kaspad/app/appmessage" -// GetTXsConfirmations sends an RPC request respective to the function's name and returns the RPC server's response +// GetTxsConfirmations sends an RPC request respective to the function's name and returns the RPC server's response func (c *RPCClient) GetTxsConfirmations(txIDs []string) (*appmessage.GetTxsConfirmationsResponseMessage, error) { err := c.rpcRouter.outgoingRoute().Enqueue(appmessage.NewGetTxsConfirmationsRequest(txIDs)) if err != nil { @@ -18,4 +18,3 @@ func (c *RPCClient) GetTxsConfirmations(txIDs []string) (*appmessage.GetTxsConfi } return getTxsConfirmationsResponse, nil } -