Skip to content

Commit

Permalink
Simplify return
Browse files Browse the repository at this point in the history
  • Loading branch information
daria305 committed Oct 17, 2023
1 parent 262a131 commit 006dfb8
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions tools/evil-spammer/models/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,7 @@ func NewWebClient(url string, opts ...options.Option[WebClient]) *WebClient {
}

func (c *WebClient) PostBlock(block *iotago.ProtocolBlock) (blockID iotago.BlockID, err error) {
id, err := c.client.SubmitBlock(context.Background(), block)
if err != nil {
return
}

return id, nil
return c.client.SubmitBlock(context.Background(), block)
}

// PostData sends the given data (payload) by creating a block in the backend.
Expand Down Expand Up @@ -316,10 +311,5 @@ func (c *WebClient) GetBlockIssuance() (resp *apimodels.IssuanceBlockHeaderRespo
}

func (c *WebClient) GetCongestion(accountID iotago.AccountID) (resp *apimodels.CongestionResponse, err error) {
resp, err = c.client.Congestion(context.Background(), accountID)
if err != nil {
return
}

return
return c.client.Congestion(context.Background(), accountID)
}

0 comments on commit 006dfb8

Please sign in to comment.