Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the API specification to reflect the minimum number of inputs returned by selectCoins. #2261

Merged

Conversation

jonathanknowles
Copy link
Member

@jonathanknowles jonathanknowles commented Oct 22, 2020

Issue

Related to #2244.

Overview

This PR updates the API specification for the selectCoins operation, changing the minimum number of inputs from 0 to 1 in the returned coin selection.

This matches the existing ApiCoinSelection type, which specifies a NonEmpty list of ApiCoinSelectionInput values:

data ApiCoinSelection (n :: NetworkDiscriminant) = ApiCoinSelection
    { inputs :: !(NonEmpty (ApiCoinSelectionInput n))
    , outputs :: ![ApiCoinSelectionOutput n]
    , change :: ![ApiCoinSelectionChange n]
    , certificates :: Maybe (NonEmpty ApiCertificate)
    } deriving (Eq, Generic, Show)

Update the minimum number of inputs from `0` to `1`.

The corresponding `ApiCoinSelection` type specifies a `NonEmpty` list of
`ApiCoinSelectionInput` values:

```
data ApiCoinSelection (n :: NetworkDiscriminant) = ApiCoinSelection
    { inputs :: !(NonEmpty (ApiCoinSelectionInput n))
    , outputs :: ![ApiCoinSelectionOutput n]
    , change :: ![ApiCoinSelectionChange n]
    , certificates :: Maybe (NonEmpty ApiCertificate)
    } deriving (Eq, Generic, Show)
```
@KtorZ
Copy link
Member

KtorZ commented Oct 22, 2020

bors merge

iohk-bors bot added a commit that referenced this pull request Oct 22, 2020
2261: Update the API specification to reflect the minimum number of inputs returned by `selectCoins`. r=KtorZ a=jonathanknowles

# Issue

Related to #2244.

# Overview

This PR updates the API specification for the `selectCoins` operation, changing the minimum number of inputs from `0` to `1` in the returned coin selection.

This matches the existing `ApiCoinSelection` type, which specifies a `NonEmpty` list of `ApiCoinSelectionInput` values:

```hs
data ApiCoinSelection (n :: NetworkDiscriminant) = ApiCoinSelection
    { inputs :: !(NonEmpty (ApiCoinSelectionInput n))
    , outputs :: ![ApiCoinSelectionOutput n]
    , change :: ![ApiCoinSelectionChange n]
    , certificates :: Maybe (NonEmpty ApiCertificate)
    } deriving (Eq, Generic, Show)
```


Co-authored-by: Jonathan Knowles <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 22, 2020

Timed out.

#2279

@KtorZ
Copy link
Member

KtorZ commented Oct 22, 2020

bors retry

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 22, 2020

Build succeeded:

@iohk-bors iohk-bors bot merged commit 3e55e26 into master Oct 22, 2020
@iohk-bors iohk-bors bot deleted the jonathanknowles/fix-coin-selection-inputs-min-bound branch October 22, 2020 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants