Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(btcjson)!: Add new LLMQ type 6 - LLMQType_25_67 #19

Merged
merged 2 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion btcjson/dashevocmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ const (
LLMQType_400_85 LLMQType = 3 // 400 members, 340 (85%) threshold, one every 24 hours
LLMQType_100_67 LLMQType = 4 // 100 members, 67 (67%) threshold, one per hour
LLMQType_60_75 LLMQType = 5 // 60 members, 45 (75%) threshold, one every 12 hours
LLMQType_25_67 LLMQType = 6 // 25 members, 67 (67%) threshold, one per hour
LLMQType_TEST LLMQType = 100 // 3 members, 2 (66%) threshold, one per hour
LLMQType_DEVNET LLMQType = 101 // 12 members, 6 (50%) threshold, one per hour
LLMQType_TEST_V17 LLMQType = 102 // 3 members, 2 (66%) threshold, one per hour
Expand All @@ -153,6 +154,7 @@ var (
"llmq_400_85": LLMQType_400_85,
"llmq_100_67": LLMQType_100_67,
"llmq_60_75": LLMQType_60_75,
"llmq_25_67": LLMQType_25_67,
"llmq_test": LLMQType_TEST,
"llmq_devnet": LLMQType_DEVNET,
"llmq_test_v17": LLMQType_TEST_V17,
Expand Down Expand Up @@ -186,7 +188,7 @@ func (t LLMQType) Name() string {
// defined in accordance with DIP-0006.
// See https://github.com/dashpay/dips/blob/master/dip-0006/llmq-types.md
func (t LLMQType) Validate() error {
if (t >= LLMQType_50_60 && t <= LLMQType_60_75) || (t >= LLMQType_TEST && t <= LLMQType_DEVNET_PLATFORM) {
if (t >= LLMQType_50_60 && t <= LLMQType_25_67) || (t >= LLMQType_TEST && t <= LLMQType_DEVNET_PLATFORM) {
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions btcjson/dashevocmds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ func TestLLMQTypeValidate(t *testing.T) {
{0, true},
{1, false},
{2, false},
{5, false},
{6, true},
{6, false},
{7, true},
{99, true},
{100, false},
{105, false},
Expand Down