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

Prevent instantiation of txns with 0 inputs or outputs #60

Closed
prestwich opened this issue Aug 4, 2020 · 2 comments · Fixed by #61
Closed

Prevent instantiation of txns with 0 inputs or outputs #60

prestwich opened this issue Aug 4, 2020 · 2 comments · Fixed by #61
Labels
bug Something isn't working core necessary functionality

Comments

@prestwich
Copy link
Member

prestwich commented Aug 4, 2020

Syntacitcally invalid transactions can be constructed. E.g. those with 0 inputs. This should be disabled

Should we update the transaction trait to new -> Result<Self, Self::Error> ?

@prestwich prestwich added bug Something isn't working core necessary functionality labels Aug 4, 2020
@tynes
Copy link
Contributor

tynes commented Aug 5, 2020

the size for values of type 'Self' cannot be known at compile time: doesn't have a size known at compile time

@prestwich
Copy link
Member Author

ya, to return Self in a trait you have to add a where Self: Sized constraint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core necessary functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants