Updates Smart Contract For Better Flow

I added the `posts.length` to `numPosts()` because it does not appear in the instructions and removed 2 `return` statements that I know will confuse people if left in, based on experience with a similar set up for the one function from DTwitter in India.
This commit is contained in:
Andy Tudhope 2018-08-25 10:29:07 +02:00 committed by GitHub
parent 0d78c99dc3
commit c57f1ac60d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -34,9 +34,8 @@ contract DReddit {
public public
view view
returns(uint) returns(uint)
{ {
// TODO: return posts.length;
return 1;
} }
// @notice Create Post // @notice Create Post
@ -65,7 +64,6 @@ contract DReddit {
returns (bool) returns (bool)
{ {
// TODO: // TODO:
return true;
} }
// @notice Obtain vote for specific post // @notice Obtain vote for specific post
@ -77,7 +75,6 @@ contract DReddit {
returns (uint8) returns (uint8)
{ {
// TODO: // TODO:
return 1;
} }
} }