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:
parent
0d78c99dc3
commit
c57f1ac60d
|
@ -35,8 +35,7 @@ contract DReddit {
|
|||
view
|
||||
returns(uint)
|
||||
{
|
||||
// TODO:
|
||||
return 1;
|
||||
return posts.length;
|
||||
}
|
||||
|
||||
// @notice Create Post
|
||||
|
@ -65,7 +64,6 @@ contract DReddit {
|
|||
returns (bool)
|
||||
{
|
||||
// TODO:
|
||||
return true;
|
||||
}
|
||||
|
||||
// @notice Obtain vote for specific post
|
||||
|
@ -77,7 +75,6 @@ contract DReddit {
|
|||
returns (uint8)
|
||||
{
|
||||
// TODO:
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue