Skip to content

Commit 170fa57

Browse files
committed
Temporarily disable voting system on testnet
This disables the voting system to allow for testing while we finish some changes that may be incompatible with the protocol. The system will be re-enabled before final testing and release.
1 parent dcda000 commit 170fa57

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/contract/polls.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ std::string GetShareType(double dShareType)
9696

9797
std::pair<std::string, std::string> CreatePollContract(std::string sTitle, int days, std::string sQuestion, std::string sAnswers, int iSharetype, std::string sURL)
9898
{
99+
// Disable the voting system on testnet while we finish protocol-breaking changes:
100+
if (fTestNet) throw std::runtime_error("Voting system is temporarily disabled.");
101+
99102
if (pwalletMain->IsLocked())
100103
return std::make_pair("Error", "Please fully unlock the wallet first.");
101104
else if (fWalletUnlockStakingOnly)
@@ -146,6 +149,9 @@ std::pair<std::string, std::string> CreatePollContract(std::string sTitle, int d
146149

147150
std::pair<std::string, std::string> CreateVoteContract(std::string sTitle, std::string sAnswer)
148151
{
152+
// Disable the voting system on testnet while we finish protocol-breaking changes:
153+
if (fTestNet) throw std::runtime_error("Voting system is temporarily disabled.");
154+
149155
if (sTitle.empty() || sAnswer.empty())
150156
return std::make_pair("Error", "Must specify a poll title and answers");
151157
if (pwalletMain->IsLocked())

0 commit comments

Comments
 (0)