Skip to content

Commit

Permalink
Rename GetBlockState to GetBlockStateFromTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrvivian committed Nov 1, 2023
1 parent 5019ff7 commit 16bebf2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions models/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ type Client interface {
PostData(data []byte) (blkID string, err error)
// GetBlockConfirmationState returns the AcceptanceState of a given block ID.
GetBlockConfirmationState(blkID iotago.BlockID) string
// GetBlockState returns the AcceptanceState of a given transaction ID.
GetBlockState(txID iotago.TransactionID) (resp *apimodels.BlockMetadataResponse, err error)
// GetBlockStateFromTransaction returns the AcceptanceState of a given transaction ID.
GetBlockStateFromTransaction(txID iotago.TransactionID) (resp *apimodels.BlockMetadataResponse, err error)
// GetOutput gets the output of a given outputID.
GetOutput(outputID iotago.OutputID) iotago.Output
// GetOutputConfirmationState gets the first unspent outputs of a given address.
Expand Down Expand Up @@ -335,7 +335,7 @@ func (c *WebClient) PostData(data []byte) (blkID string, err error) {
// GetOutputConfirmationState gets the first unspent outputs of a given address.
func (c *WebClient) GetOutputConfirmationState(outputID iotago.OutputID) string {
txID := outputID.TransactionID()
resp, err := c.GetBlockState(txID)
resp, err := c.GetBlockStateFromTransaction(txID)
if err != nil {
return ""
}
Expand Down Expand Up @@ -363,8 +363,8 @@ func (c *WebClient) GetBlockConfirmationState(blkID iotago.BlockID) string {
return resp.BlockState
}

// GetBlockState returns the AcceptanceState of a given transaction ID.
func (c *WebClient) GetBlockState(txID iotago.TransactionID) (*apimodels.BlockMetadataResponse, error) {
// GetBlockStateFromTransaction returns the AcceptanceState of a given transaction ID.
func (c *WebClient) GetBlockStateFromTransaction(txID iotago.TransactionID) (*apimodels.BlockMetadataResponse, error) {
return c.client.TransactionIncludedBlockMetadata(context.Background(), txID)
}

Expand Down

0 comments on commit 16bebf2

Please sign in to comment.