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
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue