Removing start block
This commit is contained in:
parent
a3807a8478
commit
df786d1536
|
@ -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,
|
||||
|
|
|
@ -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]});
|
||||
|
|
Loading…
Reference in New Issue