mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-26 23:46:08 +00:00
fix fmt and linting
This commit is contained in:
parent
8f1348b562
commit
3c94c86af3
@ -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
|
|
||||||
}
|
|
||||||
@ -2,7 +2,7 @@ package rpcclient
|
|||||||
|
|
||||||
import "github.com/kaspanet/kaspad/app/appmessage"
|
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) {
|
func (c *RPCClient) GetTxConfirmations(txID string) (*appmessage.GetTxConfirmationsResponseMessage, error) {
|
||||||
err := c.rpcRouter.outgoingRoute().Enqueue(appmessage.NewGetTxConfirmationsRequest(txID))
|
err := c.rpcRouter.outgoingRoute().Enqueue(appmessage.NewGetTxConfirmationsRequest(txID))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@ -18,4 +18,3 @@ func (c *RPCClient) GetTxs(txIDs []string) (*appmessage.GetTxsResponseMessage, e
|
|||||||
}
|
}
|
||||||
return getTxsResponse, nil
|
return getTxsResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package rpcclient
|
|||||||
|
|
||||||
import "github.com/kaspanet/kaspad/app/appmessage"
|
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) {
|
func (c *RPCClient) GetTxsConfirmations(txIDs []string) (*appmessage.GetTxsConfirmationsResponseMessage, error) {
|
||||||
err := c.rpcRouter.outgoingRoute().Enqueue(appmessage.NewGetTxsConfirmationsRequest(txIDs))
|
err := c.rpcRouter.outgoingRoute().Enqueue(appmessage.NewGetTxsConfirmationsRequest(txIDs))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -18,4 +18,3 @@ func (c *RPCClient) GetTxsConfirmations(txIDs []string) (*appmessage.GetTxsConfi
|
|||||||
}
|
}
|
||||||
return getTxsConfirmationsResponse, nil
|
return getTxsConfirmationsResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user