From 1fe440d0a645fdad2cc6f6d67c53844f84fdb7c2 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Sat, 7 May 2022 20:27:30 -0500 Subject: [PATCH] rpc/jsonrpc/types: Add agenda status constants. This adds constants for the possible status strings in the agenda info that is a part of the getblockchaininfo result. This is being done with the intent of decoupling the internal blockchain implementation of the threshold states from the RPC results. --- rpc/jsonrpc/types/chainsvrresults.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rpc/jsonrpc/types/chainsvrresults.go b/rpc/jsonrpc/types/chainsvrresults.go index 69f6c178..8cfabb89 100644 --- a/rpc/jsonrpc/types/chainsvrresults.go +++ b/rpc/jsonrpc/types/chainsvrresults.go @@ -1,5 +1,5 @@ // Copyright (c) 2014 The btcsuite developers -// Copyright (c) 2015-2021 The Decred developers +// Copyright (c) 2015-2022 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. @@ -91,6 +91,16 @@ type GetBlockVerboseResult struct { NextHash string `json:"nextblockhash,omitempty"` } +// The following constants specify the possible status strings for an agenda in +// a consensus deployment of a getblockchaininfo result. +const ( + AgendaInfoStatusDefined = "defined" + AgendaInfoStatusStarted = "started" + AgendaInfoStatusLockedIn = "lockedin" + AgendaInfoStatusActive = "active" + AgendaInfoStatusFailed = "failed" +) + // AgendaInfo provides an overview of an agenda in a consensus deployment. type AgendaInfo struct { Status string `json:"status"`