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.
This commit is contained in:
Dave Collins 2022-05-07 20:27:30 -05:00
parent 46305c7bf5
commit 1fe440d0a6
No known key found for this signature in database
GPG Key ID: B8904D9D9C93D1F2

View File

@ -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"`