aboutsummaryrefslogtreecommitdiffstats
path: root/dex/protocol.go
diff options
context:
space:
mode:
Diffstat (limited to 'dex/protocol.go')
-rw-r--r--dex/protocol.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/dex/protocol.go b/dex/protocol.go
index 04928d2b2..0c271248e 100644
--- a/dex/protocol.go
+++ b/dex/protocol.go
@@ -34,6 +34,7 @@
package dex
import (
+ "context"
"crypto/ecdsa"
"fmt"
"io"
@@ -60,7 +61,7 @@ var ProtocolName = "dex"
var ProtocolVersions = []uint{dex64}
// ProtocolLengths are the number of implemented message corresponding to different protocol versions.
-var ProtocolLengths = []uint64{40}
+var ProtocolLengths = []uint64{42}
const ProtocolMaxMsgSize = 10 * 1024 * 1024 // Maximum cap on the size of a protocol message
@@ -93,6 +94,9 @@ const (
DKGPartialSignatureMsg = 0x25
PullBlocksMsg = 0x26
PullVotesMsg = 0x27
+
+ GetGovStateMsg = 0x28
+ GovStateMsg = 0x29
)
type errCode int
@@ -140,6 +144,8 @@ type txPool interface {
}
type governance interface {
+ GetRoundHeight(context.Context, uint64) (uint64, error)
+
GetNumChains(uint64) uint32
LenCRS() uint64
@@ -184,6 +190,8 @@ type getBlockHeadersData struct {
Amount uint64 // Maximum number of headers to retrieve
Skip uint64 // Blocks to skip between consecutive headers
Reverse bool // Query direction (false = rising towards latest, true = falling towards genesis)
+
+ WithGov bool
}
// hashOrNumber is a combined field for specifying an origin block.