Removing start block

This commit is contained in:
Richard Ramos 2018-06-26 17:02:04 -04:00 committed by Barry Gitarts
parent a3807a8478
commit df786d1536
2 changed files with 3 additions and 6 deletions

View File

@ -53,19 +53,18 @@ contract PollManager is LowLevelStringManipulator, Controlled {
}
function addPoll(
uint _startBlock,
uint _endBlock,
bytes _description)
public
onlySNTHolder
returns (uint _idPoll)
{
require(_endBlock > _startBlock && _endBlock > block.number);
require(_endBlock > block.number);
_idPoll = _polls.length;
_polls.length ++;
Poll storage p = _polls[ _idPoll ];
p.startBlock = _startBlock;
p.startBlock = block.number;
p.endBlock = _endBlock;
p.voters = 0;
@ -78,7 +77,7 @@ contract PollManager is LowLevelStringManipulator, Controlled {
p.token = tokenFactory.createCloneToken(
address(token),
_startBlock - 1,
block.number - 1,
proposalName,
token.decimals(),
proposalSymbol,

View File

@ -82,7 +82,6 @@ describe("VotingDapp", function () {
// Creating a proposal without holding SNT SHOULD FAIL!
try {
receipt = await PollManager.methods.addPoll(
blockNumber,
blockNumber + 10,
question)
.send({from: accounts[8]});
@ -96,7 +95,6 @@ describe("VotingDapp", function () {
// Creating a proposal as a SNT holder
receipt = await PollManager.methods.addPoll(
blockNumber,
blockNumber + 10,
question)
.send({from: accounts[0]});