diff --git a/src/masternodes/govvariables/attributes.cpp b/src/masternodes/govvariables/attributes.cpp index 42d873430c..e4d31e36dc 100644 --- a/src/masternodes/govvariables/attributes.cpp +++ b/src/masternodes/govvariables/attributes.cpp @@ -365,7 +365,7 @@ ResVal VerifyPositiveFloat(const std::string& str) { ResVal VerifyPositiveOrMinusOneFloat(const std::string& str) { CAmount amount = 0; - if (!ParseFixedPoint(str, 8, &amount) || !(amount > 0 || amount == -1 * COIN)) { + if (!ParseFixedPoint(str, 8, &amount) || !(amount >= 0 || amount == -1 * COIN)) { return Res::Err("Amount must be positive or -1"); } diff --git a/test/functional/feature_consortium.py b/test/functional/feature_consortium.py index e6f193e254..4877557820 100755 --- a/test/functional/feature_consortium.py +++ b/test/functional/feature_consortium.py @@ -93,6 +93,8 @@ def run_test(self): assert_raises_rpc_error(-32600, "You are not a foundation member or token owner and cannot mint this token", self.nodes[3].minttokens, ["1@" + symbolBTC]) # Set global mint limits + self.nodes[0].setgov({"ATTRIBUTES": {'v0/consortium/' + idBTC + '/mint_limit': '0', + 'v0/consortium/' + idBTC + '/mint_limit_daily': '0'}}) self.nodes[0].setgov({"ATTRIBUTES":{'v0/consortium/' + idBTC + '/mint_limit' : '10', 'v0/consortium/' + idBTC + '/mint_limit_daily' : '10'}}) self.nodes[0].generate(1) self.sync_blocks() @@ -512,8 +514,6 @@ def run_test(self): # Throw error for invalid values assert_raises_rpc_error(-5, "Amount must be positive or -1", self.nodes[0].setgov, { "ATTRIBUTES": {'v0/consortium/' + idBTC + '/mint_limit': '-2'}}) - assert_raises_rpc_error(-5, "Amount must be positive or -1", self.nodes[0].setgov, { - "ATTRIBUTES": {'v0/consortium/' + idBTC + '/mint_limit': '0'}}) if __name__ == '__main__': ConsortiumTest().main()