mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-27 15:53:57 +00:00
Implement NotifyVirtualDaaScoreChanged (#1737)
* Add notifyVirtualDaaScoreChanged to protowire. * Add notifyVirtualDaaScoreChanged to the rest of kaspad. * Add notifyVirtualDaaScoreChanged to the rest of kaspad. * Test the DAA score notification in TestVirtualSelectedParentBlueScore. * Rename TestVirtualSelectedParentBlueScore to TestVirtualSelectedParentBlueScoreAndVirtualDAAScore.
This commit is contained in:
parent
4461f56ca3
commit
0adfb2dfbb
@ -137,6 +137,9 @@ const (
|
||||
CmdPruningPointUTXOSetOverrideNotificationMessage
|
||||
CmdStopNotifyingPruningPointUTXOSetOverrideRequestMessage
|
||||
CmdStopNotifyingPruningPointUTXOSetOverrideResponseMessage
|
||||
CmdNotifyVirtualDaaScoreChangedRequestMessage
|
||||
CmdNotifyVirtualDaaScoreChangedResponseMessage
|
||||
CmdVirtualDaaScoreChangedNotificationMessage
|
||||
)
|
||||
|
||||
// ProtocolMessageCommandToString maps all MessageCommands to their string representation
|
||||
@ -248,6 +251,9 @@ var RPCMessageCommandToString = map[MessageCommand]string{
|
||||
CmdPruningPointUTXOSetOverrideNotificationMessage: "PruningPointUTXOSetOverrideNotification",
|
||||
CmdStopNotifyingPruningPointUTXOSetOverrideRequestMessage: "StopNotifyingPruningPointUTXOSetOverrideRequest",
|
||||
CmdStopNotifyingPruningPointUTXOSetOverrideResponseMessage: "StopNotifyingPruningPointUTXOSetOverrideResponse",
|
||||
CmdNotifyVirtualDaaScoreChangedRequestMessage: "NotifyVirtualDaaScoreChangedRequest",
|
||||
CmdNotifyVirtualDaaScoreChangedResponseMessage: "NotifyVirtualDaaScoreChangedResponse",
|
||||
CmdVirtualDaaScoreChangedNotificationMessage: "VirtualDaaScoreChangedNotification",
|
||||
}
|
||||
|
||||
// Message is an interface that describes a kaspa message. A type that
|
||||
|
||||
55
app/appmessage/rpc_notify_virtual_daa_score_changed.go
Normal file
55
app/appmessage/rpc_notify_virtual_daa_score_changed.go
Normal file
@ -0,0 +1,55 @@
|
||||
package appmessage
|
||||
|
||||
// NotifyVirtualDaaScoreChangedRequestMessage is an appmessage corresponding to
|
||||
// its respective RPC message
|
||||
type NotifyVirtualDaaScoreChangedRequestMessage struct {
|
||||
baseMessage
|
||||
}
|
||||
|
||||
// Command returns the protocol command string for the message
|
||||
func (msg *NotifyVirtualDaaScoreChangedRequestMessage) Command() MessageCommand {
|
||||
return CmdNotifyVirtualDaaScoreChangedRequestMessage
|
||||
}
|
||||
|
||||
// NewNotifyVirtualDaaScoreChangedRequestMessage returns a instance of the message
|
||||
func NewNotifyVirtualDaaScoreChangedRequestMessage() *NotifyVirtualDaaScoreChangedRequestMessage {
|
||||
return &NotifyVirtualDaaScoreChangedRequestMessage{}
|
||||
}
|
||||
|
||||
// NotifyVirtualDaaScoreChangedResponseMessage is an appmessage corresponding to
|
||||
// its respective RPC message
|
||||
type NotifyVirtualDaaScoreChangedResponseMessage struct {
|
||||
baseMessage
|
||||
Error *RPCError
|
||||
}
|
||||
|
||||
// Command returns the protocol command string for the message
|
||||
func (msg *NotifyVirtualDaaScoreChangedResponseMessage) Command() MessageCommand {
|
||||
return CmdNotifyVirtualDaaScoreChangedResponseMessage
|
||||
}
|
||||
|
||||
// NewNotifyVirtualDaaScoreChangedResponseMessage returns a instance of the message
|
||||
func NewNotifyVirtualDaaScoreChangedResponseMessage() *NotifyVirtualDaaScoreChangedResponseMessage {
|
||||
return &NotifyVirtualDaaScoreChangedResponseMessage{}
|
||||
}
|
||||
|
||||
// VirtualDaaScoreChangedNotificationMessage is an appmessage corresponding to
|
||||
// its respective RPC message
|
||||
type VirtualDaaScoreChangedNotificationMessage struct {
|
||||
baseMessage
|
||||
VirtualDaaScore uint64
|
||||
}
|
||||
|
||||
// Command returns the protocol command string for the message
|
||||
func (msg *VirtualDaaScoreChangedNotificationMessage) Command() MessageCommand {
|
||||
return CmdVirtualDaaScoreChangedNotificationMessage
|
||||
}
|
||||
|
||||
// NewVirtualDaaScoreChangedNotificationMessage returns a instance of the message
|
||||
func NewVirtualDaaScoreChangedNotificationMessage(
|
||||
virtualDaaScore uint64) *VirtualDaaScoreChangedNotificationMessage {
|
||||
|
||||
return &VirtualDaaScoreChangedNotificationMessage{
|
||||
VirtualDaaScore: virtualDaaScore,
|
||||
}
|
||||
}
|
||||
@ -64,6 +64,11 @@ func (m *Manager) NotifyBlockAddedToDAG(block *externalapi.DomainBlock, blockIns
|
||||
return err
|
||||
}
|
||||
|
||||
err = m.notifyVirtualDaaScoreChanged()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = m.notifyVirtualSelectedParentChainChanged(blockInsertionResult)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -153,6 +158,19 @@ func (m *Manager) notifyVirtualSelectedParentBlueScoreChanged() error {
|
||||
return m.context.NotificationManager.NotifyVirtualSelectedParentBlueScoreChanged(notification)
|
||||
}
|
||||
|
||||
func (m *Manager) notifyVirtualDaaScoreChanged() error {
|
||||
onEnd := logger.LogAndMeasureExecutionTime(log, "RPCManager.NotifyVirtualDaaScoreChanged")
|
||||
defer onEnd()
|
||||
|
||||
virtualInfo, err := m.context.Domain.Consensus().GetVirtualInfo()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
notification := appmessage.NewVirtualDaaScoreChangedNotificationMessage(virtualInfo.DAAScore)
|
||||
return m.context.NotificationManager.NotifyVirtualDaaScoreChanged(notification)
|
||||
}
|
||||
|
||||
func (m *Manager) notifyVirtualSelectedParentChainChanged(blockInsertionResult *externalapi.BlockInsertionResult) error {
|
||||
onEnd := logger.LogAndMeasureExecutionTime(log, "RPCManager.NotifyVirtualSelectedParentChainChanged")
|
||||
defer onEnd()
|
||||
|
||||
@ -44,6 +44,7 @@ var handlers = map[appmessage.MessageCommand]handler{
|
||||
appmessage.CmdGetInfoRequestMessage: rpchandlers.HandleGetInfo,
|
||||
appmessage.CmdNotifyPruningPointUTXOSetOverrideRequestMessage: rpchandlers.HandleNotifyPruningPointUTXOSetOverrideRequest,
|
||||
appmessage.CmdStopNotifyingPruningPointUTXOSetOverrideRequestMessage: rpchandlers.HandleStopNotifyingPruningPointUTXOSetOverrideRequest,
|
||||
appmessage.CmdNotifyVirtualDaaScoreChangedRequestMessage: rpchandlers.HandleNotifyVirtualDaaScoreChanged,
|
||||
}
|
||||
|
||||
func (m *Manager) routerInitializer(router *router.Router, netConnection *netadapter.NetConnection) {
|
||||
|
||||
@ -30,6 +30,7 @@ type NotificationListener struct {
|
||||
propagateFinalityConflictResolvedNotifications bool
|
||||
propagateUTXOsChangedNotifications bool
|
||||
propagateVirtualSelectedParentBlueScoreChangedNotifications bool
|
||||
propagateVirtualDaaScoreChangedNotifications bool
|
||||
propagatePruningPointUTXOSetOverrideNotifications bool
|
||||
|
||||
propagateUTXOsChangedNotificationAddresses map[utxoindex.ScriptPublicKeyString]*UTXOsChangedNotificationAddress
|
||||
@ -181,6 +182,25 @@ func (nm *NotificationManager) NotifyVirtualSelectedParentBlueScoreChanged(
|
||||
return nil
|
||||
}
|
||||
|
||||
// NotifyVirtualDaaScoreChanged notifies the notification manager that the DAG's
|
||||
// virtual DAA score has changed
|
||||
func (nm *NotificationManager) NotifyVirtualDaaScoreChanged(
|
||||
notification *appmessage.VirtualDaaScoreChangedNotificationMessage) error {
|
||||
|
||||
nm.RLock()
|
||||
defer nm.RUnlock()
|
||||
|
||||
for router, listener := range nm.listeners {
|
||||
if listener.propagateVirtualDaaScoreChangedNotifications {
|
||||
err := router.OutgoingRoute().Enqueue(notification)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// NotifyPruningPointUTXOSetOverride notifies the notification manager that the UTXO index
|
||||
// reset due to pruning point change via IBD.
|
||||
func (nm *NotificationManager) NotifyPruningPointUTXOSetOverride() error {
|
||||
@ -308,6 +328,12 @@ func (nl *NotificationListener) PropagateVirtualSelectedParentBlueScoreChangedNo
|
||||
nl.propagateVirtualSelectedParentBlueScoreChangedNotifications = true
|
||||
}
|
||||
|
||||
// PropagateVirtualDaaScoreChangedNotifications instructs the listener to send
|
||||
// virtual DAA score notifications to the remote listener
|
||||
func (nl *NotificationListener) PropagateVirtualDaaScoreChangedNotifications() {
|
||||
nl.propagateVirtualDaaScoreChangedNotifications = true
|
||||
}
|
||||
|
||||
// PropagatePruningPointUTXOSetOverrideNotifications instructs the listener to send pruning point UTXO set override notifications
|
||||
// to the remote listener.
|
||||
func (nl *NotificationListener) PropagatePruningPointUTXOSetOverrideNotifications() {
|
||||
|
||||
19
app/rpc/rpchandlers/notify_virtual_daa_score_changed.go
Normal file
19
app/rpc/rpchandlers/notify_virtual_daa_score_changed.go
Normal file
@ -0,0 +1,19 @@
|
||||
package rpchandlers
|
||||
|
||||
import (
|
||||
"github.com/kaspanet/kaspad/app/appmessage"
|
||||
"github.com/kaspanet/kaspad/app/rpc/rpccontext"
|
||||
"github.com/kaspanet/kaspad/infrastructure/network/netadapter/router"
|
||||
)
|
||||
|
||||
// HandleNotifyVirtualDaaScoreChanged handles the respectively named RPC command
|
||||
func HandleNotifyVirtualDaaScoreChanged(context *rpccontext.Context, router *router.Router, _ appmessage.Message) (appmessage.Message, error) {
|
||||
listener, err := context.NotificationManager.Listener(router)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
listener.PropagateVirtualDaaScoreChangedNotifications()
|
||||
|
||||
response := appmessage.NewNotifyVirtualDaaScoreChangedResponseMessage()
|
||||
return response, nil
|
||||
}
|
||||
@ -1,13 +1,12 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.12.3
|
||||
// source: messages.proto
|
||||
|
||||
package protowire
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@ -21,10 +20,6 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type KaspadMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -134,6 +129,9 @@ type KaspadMessage struct {
|
||||
// *KaspadMessage_PruningPointUTXOSetOverrideNotification
|
||||
// *KaspadMessage_StopNotifyingPruningPointUTXOSetOverrideRequest
|
||||
// *KaspadMessage_StopNotifyingPruningPointUTXOSetOverrideResponse
|
||||
// *KaspadMessage_NotifyVirtualDaaScoreChangedRequest
|
||||
// *KaspadMessage_NotifyVirtualDaaScoreChangedResponse
|
||||
// *KaspadMessage_VirtualDaaScoreChangedNotification
|
||||
Payload isKaspadMessage_Payload `protobuf_oneof:"payload"`
|
||||
}
|
||||
|
||||
@ -897,6 +895,27 @@ func (x *KaspadMessage) GetStopNotifyingPruningPointUTXOSetOverrideResponse() *S
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *KaspadMessage) GetNotifyVirtualDaaScoreChangedRequest() *NotifyVirtualDaaScoreChangedRequestMessage {
|
||||
if x, ok := x.GetPayload().(*KaspadMessage_NotifyVirtualDaaScoreChangedRequest); ok {
|
||||
return x.NotifyVirtualDaaScoreChangedRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *KaspadMessage) GetNotifyVirtualDaaScoreChangedResponse() *NotifyVirtualDaaScoreChangedResponseMessage {
|
||||
if x, ok := x.GetPayload().(*KaspadMessage_NotifyVirtualDaaScoreChangedResponse); ok {
|
||||
return x.NotifyVirtualDaaScoreChangedResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *KaspadMessage) GetVirtualDaaScoreChangedNotification() *VirtualDaaScoreChangedNotificationMessage {
|
||||
if x, ok := x.GetPayload().(*KaspadMessage_VirtualDaaScoreChangedNotification); ok {
|
||||
return x.VirtualDaaScoreChangedNotification
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type isKaspadMessage_Payload interface {
|
||||
isKaspadMessage_Payload()
|
||||
}
|
||||
@ -1313,6 +1332,18 @@ type KaspadMessage_StopNotifyingPruningPointUTXOSetOverrideResponse struct {
|
||||
StopNotifyingPruningPointUTXOSetOverrideResponse *StopNotifyingPruningPointUTXOSetOverrideResponseMessage `protobuf:"bytes,1071,opt,name=stopNotifyingPruningPointUTXOSetOverrideResponse,proto3,oneof"`
|
||||
}
|
||||
|
||||
type KaspadMessage_NotifyVirtualDaaScoreChangedRequest struct {
|
||||
NotifyVirtualDaaScoreChangedRequest *NotifyVirtualDaaScoreChangedRequestMessage `protobuf:"bytes,1072,opt,name=notifyVirtualDaaScoreChangedRequest,proto3,oneof"`
|
||||
}
|
||||
|
||||
type KaspadMessage_NotifyVirtualDaaScoreChangedResponse struct {
|
||||
NotifyVirtualDaaScoreChangedResponse *NotifyVirtualDaaScoreChangedResponseMessage `protobuf:"bytes,1073,opt,name=notifyVirtualDaaScoreChangedResponse,proto3,oneof"`
|
||||
}
|
||||
|
||||
type KaspadMessage_VirtualDaaScoreChangedNotification struct {
|
||||
VirtualDaaScoreChangedNotification *VirtualDaaScoreChangedNotificationMessage `protobuf:"bytes,1074,opt,name=virtualDaaScoreChangedNotification,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*KaspadMessage_Addresses) isKaspadMessage_Payload() {}
|
||||
|
||||
func (*KaspadMessage_Block) isKaspadMessage_Payload() {}
|
||||
@ -1519,13 +1550,19 @@ func (*KaspadMessage_StopNotifyingPruningPointUTXOSetOverrideRequest) isKaspadMe
|
||||
|
||||
func (*KaspadMessage_StopNotifyingPruningPointUTXOSetOverrideResponse) isKaspadMessage_Payload() {}
|
||||
|
||||
func (*KaspadMessage_NotifyVirtualDaaScoreChangedRequest) isKaspadMessage_Payload() {}
|
||||
|
||||
func (*KaspadMessage_NotifyVirtualDaaScoreChangedResponse) isKaspadMessage_Payload() {}
|
||||
|
||||
func (*KaspadMessage_VirtualDaaScoreChangedNotification) isKaspadMessage_Payload() {}
|
||||
|
||||
var File_messages_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_messages_proto_rawDesc = []byte{
|
||||
0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x1a, 0x09, 0x70, 0x32, 0x70,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x22, 0xa4, 0x55, 0x0a, 0x0d, 0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x6f, 0x22, 0xcb, 0x58, 0x0a, 0x0d, 0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69,
|
||||
0x72, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73,
|
||||
@ -2206,21 +2243,48 @@ var file_messages_proto_rawDesc = []byte{
|
||||
0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x30, 0x73, 0x74, 0x6f,
|
||||
0x70, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e,
|
||||
0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x55, 0x54, 0x58, 0x4f, 0x53, 0x65, 0x74, 0x4f, 0x76, 0x65,
|
||||
0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x0a,
|
||||
0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x32, 0x50, 0x0a, 0x03, 0x50, 0x32, 0x50, 0x12,
|
||||
0x49, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
|
||||
0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4b, 0x61, 0x73,
|
||||
0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x32, 0x50, 0x0a, 0x03, 0x52, 0x50,
|
||||
0x43, 0x12, 0x49, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65,
|
||||
0x61, 0x6d, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4b,
|
||||
0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x18, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d,
|
||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x26, 0x5a, 0x24,
|
||||
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61,
|
||||
0x6e, 0x65, 0x74, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x77, 0x69, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8a, 0x01,
|
||||
0x0a, 0x23, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44,
|
||||
0x61, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0xb0, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x56,
|
||||
0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x23, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x56, 0x69, 0x72,
|
||||
0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x8d, 0x01, 0x0a, 0x24, 0x6e,
|
||||
0x6f, 0x74, 0x69, 0x66, 0x79, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53,
|
||||
0x63, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x18, 0xb1, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x56, 0x69, 0x72,
|
||||
0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x48, 0x00, 0x52, 0x24, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x56, 0x69, 0x72, 0x74,
|
||||
0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67,
|
||||
0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x22, 0x76,
|
||||
0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0xb2, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x77, 0x69, 0x72, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53,
|
||||
0x63, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66,
|
||||
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00,
|
||||
0x52, 0x22, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f, 0x72,
|
||||
0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x32,
|
||||
0x50, 0x0a, 0x03, 0x50, 0x32, 0x50, 0x12, 0x49, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77,
|
||||
0x69, 0x72, 0x65, 0x2e, 0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4b, 0x61,
|
||||
0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30,
|
||||
0x01, 0x32, 0x50, 0x0a, 0x03, 0x52, 0x50, 0x43, 0x12, 0x49, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e,
|
||||
0x4b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28,
|
||||
0x01, 0x30, 0x01, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61,
|
||||
0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -2340,6 +2404,9 @@ var file_messages_proto_goTypes = []interface{}{
|
||||
(*PruningPointUTXOSetOverrideNotificationMessage)(nil), // 100: protowire.PruningPointUTXOSetOverrideNotificationMessage
|
||||
(*StopNotifyingPruningPointUTXOSetOverrideRequestMessage)(nil), // 101: protowire.StopNotifyingPruningPointUTXOSetOverrideRequestMessage
|
||||
(*StopNotifyingPruningPointUTXOSetOverrideResponseMessage)(nil), // 102: protowire.StopNotifyingPruningPointUTXOSetOverrideResponseMessage
|
||||
(*NotifyVirtualDaaScoreChangedRequestMessage)(nil), // 103: protowire.NotifyVirtualDaaScoreChangedRequestMessage
|
||||
(*NotifyVirtualDaaScoreChangedResponseMessage)(nil), // 104: protowire.NotifyVirtualDaaScoreChangedResponseMessage
|
||||
(*VirtualDaaScoreChangedNotificationMessage)(nil), // 105: protowire.VirtualDaaScoreChangedNotificationMessage
|
||||
}
|
||||
var file_messages_proto_depIdxs = []int32{
|
||||
1, // 0: protowire.KaspadMessage.addresses:type_name -> protowire.AddressesMessage
|
||||
@ -2445,15 +2512,18 @@ var file_messages_proto_depIdxs = []int32{
|
||||
100, // 100: protowire.KaspadMessage.pruningPointUTXOSetOverrideNotification:type_name -> protowire.PruningPointUTXOSetOverrideNotificationMessage
|
||||
101, // 101: protowire.KaspadMessage.stopNotifyingPruningPointUTXOSetOverrideRequest:type_name -> protowire.StopNotifyingPruningPointUTXOSetOverrideRequestMessage
|
||||
102, // 102: protowire.KaspadMessage.stopNotifyingPruningPointUTXOSetOverrideResponse:type_name -> protowire.StopNotifyingPruningPointUTXOSetOverrideResponseMessage
|
||||
0, // 103: protowire.P2P.MessageStream:input_type -> protowire.KaspadMessage
|
||||
0, // 104: protowire.RPC.MessageStream:input_type -> protowire.KaspadMessage
|
||||
0, // 105: protowire.P2P.MessageStream:output_type -> protowire.KaspadMessage
|
||||
0, // 106: protowire.RPC.MessageStream:output_type -> protowire.KaspadMessage
|
||||
105, // [105:107] is the sub-list for method output_type
|
||||
103, // [103:105] is the sub-list for method input_type
|
||||
103, // [103:103] is the sub-list for extension type_name
|
||||
103, // [103:103] is the sub-list for extension extendee
|
||||
0, // [0:103] is the sub-list for field type_name
|
||||
103, // 103: protowire.KaspadMessage.notifyVirtualDaaScoreChangedRequest:type_name -> protowire.NotifyVirtualDaaScoreChangedRequestMessage
|
||||
104, // 104: protowire.KaspadMessage.notifyVirtualDaaScoreChangedResponse:type_name -> protowire.NotifyVirtualDaaScoreChangedResponseMessage
|
||||
105, // 105: protowire.KaspadMessage.virtualDaaScoreChangedNotification:type_name -> protowire.VirtualDaaScoreChangedNotificationMessage
|
||||
0, // 106: protowire.P2P.MessageStream:input_type -> protowire.KaspadMessage
|
||||
0, // 107: protowire.RPC.MessageStream:input_type -> protowire.KaspadMessage
|
||||
0, // 108: protowire.P2P.MessageStream:output_type -> protowire.KaspadMessage
|
||||
0, // 109: protowire.RPC.MessageStream:output_type -> protowire.KaspadMessage
|
||||
108, // [108:110] is the sub-list for method output_type
|
||||
106, // [106:108] is the sub-list for method input_type
|
||||
106, // [106:106] is the sub-list for extension type_name
|
||||
106, // [106:106] is the sub-list for extension extendee
|
||||
0, // [0:106] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_messages_proto_init() }
|
||||
@ -2581,6 +2651,9 @@ func file_messages_proto_init() {
|
||||
(*KaspadMessage_PruningPointUTXOSetOverrideNotification)(nil),
|
||||
(*KaspadMessage_StopNotifyingPruningPointUTXOSetOverrideRequest)(nil),
|
||||
(*KaspadMessage_StopNotifyingPruningPointUTXOSetOverrideResponse)(nil),
|
||||
(*KaspadMessage_NotifyVirtualDaaScoreChangedRequest)(nil),
|
||||
(*KaspadMessage_NotifyVirtualDaaScoreChangedResponse)(nil),
|
||||
(*KaspadMessage_VirtualDaaScoreChangedNotification)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
||||
@ -112,6 +112,9 @@ message KaspadMessage {
|
||||
PruningPointUTXOSetOverrideNotificationMessage pruningPointUTXOSetOverrideNotification = 1069;
|
||||
StopNotifyingPruningPointUTXOSetOverrideRequestMessage stopNotifyingPruningPointUTXOSetOverrideRequest = 1070;
|
||||
StopNotifyingPruningPointUTXOSetOverrideResponseMessage stopNotifyingPruningPointUTXOSetOverrideResponse = 1071;
|
||||
NotifyVirtualDaaScoreChangedRequestMessage notifyVirtualDaaScoreChangedRequest = 1072;
|
||||
NotifyVirtualDaaScoreChangedResponseMessage notifyVirtualDaaScoreChangedResponse = 1073;
|
||||
VirtualDaaScoreChangedNotificationMessage virtualDaaScoreChangedNotification = 1074;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -11,7 +11,8 @@ import (
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// P2PClient is the client API for P2P service.
|
||||
//
|
||||
@ -29,7 +30,7 @@ func NewP2PClient(cc grpc.ClientConnInterface) P2PClient {
|
||||
}
|
||||
|
||||
func (c *p2PClient) MessageStream(ctx context.Context, opts ...grpc.CallOption) (P2P_MessageStreamClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_P2P_serviceDesc.Streams[0], "/protowire.P2P/MessageStream", opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &P2P_ServiceDesc.Streams[0], "/protowire.P2P/MessageStream", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -71,13 +72,20 @@ type P2PServer interface {
|
||||
type UnimplementedP2PServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedP2PServer) MessageStream(P2P_MessageStreamServer) error {
|
||||
func (UnimplementedP2PServer) MessageStream(P2P_MessageStreamServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method MessageStream not implemented")
|
||||
}
|
||||
func (*UnimplementedP2PServer) mustEmbedUnimplementedP2PServer() {}
|
||||
func (UnimplementedP2PServer) mustEmbedUnimplementedP2PServer() {}
|
||||
|
||||
func RegisterP2PServer(s *grpc.Server, srv P2PServer) {
|
||||
s.RegisterService(&_P2P_serviceDesc, srv)
|
||||
// UnsafeP2PServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to P2PServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeP2PServer interface {
|
||||
mustEmbedUnimplementedP2PServer()
|
||||
}
|
||||
|
||||
func RegisterP2PServer(s grpc.ServiceRegistrar, srv P2PServer) {
|
||||
s.RegisterService(&P2P_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _P2P_MessageStream_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
@ -106,7 +114,10 @@ func (x *p2PMessageStreamServer) Recv() (*KaspadMessage, error) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
var _P2P_serviceDesc = grpc.ServiceDesc{
|
||||
// P2P_ServiceDesc is the grpc.ServiceDesc for P2P service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var P2P_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "protowire.P2P",
|
||||
HandlerType: (*P2PServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
@ -137,7 +148,7 @@ func NewRPCClient(cc grpc.ClientConnInterface) RPCClient {
|
||||
}
|
||||
|
||||
func (c *rPCClient) MessageStream(ctx context.Context, opts ...grpc.CallOption) (RPC_MessageStreamClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_RPC_serviceDesc.Streams[0], "/protowire.RPC/MessageStream", opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &RPC_ServiceDesc.Streams[0], "/protowire.RPC/MessageStream", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -179,13 +190,20 @@ type RPCServer interface {
|
||||
type UnimplementedRPCServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedRPCServer) MessageStream(RPC_MessageStreamServer) error {
|
||||
func (UnimplementedRPCServer) MessageStream(RPC_MessageStreamServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method MessageStream not implemented")
|
||||
}
|
||||
func (*UnimplementedRPCServer) mustEmbedUnimplementedRPCServer() {}
|
||||
func (UnimplementedRPCServer) mustEmbedUnimplementedRPCServer() {}
|
||||
|
||||
func RegisterRPCServer(s *grpc.Server, srv RPCServer) {
|
||||
s.RegisterService(&_RPC_serviceDesc, srv)
|
||||
// UnsafeRPCServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to RPCServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeRPCServer interface {
|
||||
mustEmbedUnimplementedRPCServer()
|
||||
}
|
||||
|
||||
func RegisterRPCServer(s grpc.ServiceRegistrar, srv RPCServer) {
|
||||
s.RegisterService(&RPC_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _RPC_MessageStream_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
@ -214,7 +232,10 @@ func (x *rPCMessageStreamServer) Recv() (*KaspadMessage, error) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
var _RPC_serviceDesc = grpc.ServiceDesc{
|
||||
// RPC_ServiceDesc is the grpc.ServiceDesc for RPC service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var RPC_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "protowire.RPC",
|
||||
HandlerType: (*RPCServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.12.3
|
||||
// source: p2p.proto
|
||||
|
||||
package protowire
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@ -21,10 +20,6 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type RequestAddressesMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
||||
@ -4,32 +4,42 @@
|
||||
## Table of Contents
|
||||
|
||||
- [rpc.proto](#rpc.proto)
|
||||
- [RPCError](#protowire.RPCError)
|
||||
- [GetCurrentNetworkRequestMessage](#protowire.GetCurrentNetworkRequestMessage)
|
||||
- [GetCurrentNetworkResponseMessage](#protowire.GetCurrentNetworkResponseMessage)
|
||||
- [SubmitBlockRequestMessage](#protowire.SubmitBlockRequestMessage)
|
||||
- [RpcBlock](#protowire.RpcBlock)
|
||||
- [RpcBlockHeader](#protowire.RpcBlockHeader)
|
||||
- [SubmitBlockResponseMessage](#protowire.SubmitBlockResponseMessage)
|
||||
- [GetBlockTemplateRequestMessage](#protowire.GetBlockTemplateRequestMessage)
|
||||
- [GetBlockTemplateResponseMessage](#protowire.GetBlockTemplateResponseMessage)
|
||||
- [NotifyBlockAddedRequestMessage](#protowire.NotifyBlockAddedRequestMessage)
|
||||
- [NotifyBlockAddedResponseMessage](#protowire.NotifyBlockAddedResponseMessage)
|
||||
- [BlockAddedNotificationMessage](#protowire.BlockAddedNotificationMessage)
|
||||
- [GetPeerAddressesRequestMessage](#protowire.GetPeerAddressesRequestMessage)
|
||||
- [GetPeerAddressesResponseMessage](#protowire.GetPeerAddressesResponseMessage)
|
||||
- [GetPeerAddressesKnownAddressMessage](#protowire.GetPeerAddressesKnownAddressMessage)
|
||||
- [GetSelectedTipHashRequestMessage](#protowire.GetSelectedTipHashRequestMessage)
|
||||
- [GetSelectedTipHashResponseMessage](#protowire.GetSelectedTipHashResponseMessage)
|
||||
- [GetMempoolEntryRequestMessage](#protowire.GetMempoolEntryRequestMessage)
|
||||
- [GetMempoolEntryResponseMessage](#protowire.GetMempoolEntryResponseMessage)
|
||||
- [GetMempoolEntriesRequestMessage](#protowire.GetMempoolEntriesRequestMessage)
|
||||
- [GetMempoolEntriesResponseMessage](#protowire.GetMempoolEntriesResponseMessage)
|
||||
- [MempoolEntry](#protowire.MempoolEntry)
|
||||
- [GetConnectedPeerInfoRequestMessage](#protowire.GetConnectedPeerInfoRequestMessage)
|
||||
- [GetConnectedPeerInfoResponseMessage](#protowire.GetConnectedPeerInfoResponseMessage)
|
||||
- [GetConnectedPeerInfoMessage](#protowire.GetConnectedPeerInfoMessage)
|
||||
- [AddPeerRequestMessage](#protowire.AddPeerRequestMessage)
|
||||
- [RPCError](#protowire.RPCError)
|
||||
- [RpcBlock](#protowire.RpcBlock)
|
||||
- [RpcBlockHeader](#protowire.RpcBlockHeader)
|
||||
- [RpcBlockVerboseData](#protowire.RpcBlockVerboseData)
|
||||
- [RpcTransaction](#protowire.RpcTransaction)
|
||||
- [RpcTransactionInput](#protowire.RpcTransactionInput)
|
||||
- [RpcScriptPublicKey](#protowire.RpcScriptPublicKey)
|
||||
- [RpcTransactionOutput](#protowire.RpcTransactionOutput)
|
||||
- [RpcOutpoint](#protowire.RpcOutpoint)
|
||||
- [RpcUtxoEntry](#protowire.RpcUtxoEntry)
|
||||
- [RpcTransactionVerboseData](#protowire.RpcTransactionVerboseData)
|
||||
- [RpcTransactionInputVerboseData](#protowire.RpcTransactionInputVerboseData)
|
||||
- [RpcTransactionOutputVerboseData](#protowire.RpcTransactionOutputVerboseData)
|
||||
- [GetCurrentNetworkRequestMessage](#protowire.GetCurrentNetworkRequestMessage)
|
||||
- [GetCurrentNetworkResponseMessage](#protowire.GetCurrentNetworkResponseMessage)
|
||||
- [SubmitBlockRequestMessage](#protowire.SubmitBlockRequestMessage)
|
||||
- [SubmitBlockResponseMessage](#protowire.SubmitBlockResponseMessage)
|
||||
- [GetBlockTemplateRequestMessage](#protowire.GetBlockTemplateRequestMessage)
|
||||
- [GetBlockTemplateResponseMessage](#protowire.GetBlockTemplateResponseMessage)
|
||||
- [NotifyBlockAddedRequestMessage](#protowire.NotifyBlockAddedRequestMessage)
|
||||
- [NotifyBlockAddedResponseMessage](#protowire.NotifyBlockAddedResponseMessage)
|
||||
- [BlockAddedNotificationMessage](#protowire.BlockAddedNotificationMessage)
|
||||
- [GetPeerAddressesRequestMessage](#protowire.GetPeerAddressesRequestMessage)
|
||||
- [GetPeerAddressesResponseMessage](#protowire.GetPeerAddressesResponseMessage)
|
||||
- [GetPeerAddressesKnownAddressMessage](#protowire.GetPeerAddressesKnownAddressMessage)
|
||||
- [GetSelectedTipHashRequestMessage](#protowire.GetSelectedTipHashRequestMessage)
|
||||
- [GetSelectedTipHashResponseMessage](#protowire.GetSelectedTipHashResponseMessage)
|
||||
- [GetMempoolEntryRequestMessage](#protowire.GetMempoolEntryRequestMessage)
|
||||
- [GetMempoolEntryResponseMessage](#protowire.GetMempoolEntryResponseMessage)
|
||||
- [GetMempoolEntriesRequestMessage](#protowire.GetMempoolEntriesRequestMessage)
|
||||
- [GetMempoolEntriesResponseMessage](#protowire.GetMempoolEntriesResponseMessage)
|
||||
- [MempoolEntry](#protowire.MempoolEntry)
|
||||
- [GetConnectedPeerInfoRequestMessage](#protowire.GetConnectedPeerInfoRequestMessage)
|
||||
- [GetConnectedPeerInfoResponseMessage](#protowire.GetConnectedPeerInfoResponseMessage)
|
||||
- [GetConnectedPeerInfoMessage](#protowire.GetConnectedPeerInfoMessage)
|
||||
- [AddPeerRequestMessage](#protowire.AddPeerRequestMessage)
|
||||
- [AddPeerResponseMessage](#protowire.AddPeerResponseMessage)
|
||||
- [SubmitTransactionRequestMessage](#protowire.SubmitTransactionRequestMessage)
|
||||
- [SubmitTransactionResponseMessage](#protowire.SubmitTransactionResponseMessage)
|
||||
@ -40,10 +50,6 @@
|
||||
- [AcceptedBlock](#protowire.AcceptedBlock)
|
||||
- [GetBlockRequestMessage](#protowire.GetBlockRequestMessage)
|
||||
- [GetBlockResponseMessage](#protowire.GetBlockResponseMessage)
|
||||
- [BlockVerboseData](#protowire.BlockVerboseData)
|
||||
- [TransactionVerboseData](#protowire.TransactionVerboseData)
|
||||
- [TransactionVerboseInput](#protowire.TransactionVerboseInput)
|
||||
- [TransactionVerboseOutput](#protowire.TransactionVerboseOutput)
|
||||
- [GetSubnetworkRequestMessage](#protowire.GetSubnetworkRequestMessage)
|
||||
- [GetSubnetworkResponseMessage](#protowire.GetSubnetworkResponseMessage)
|
||||
- [GetVirtualSelectedParentChainFromBlockRequestMessage](#protowire.GetVirtualSelectedParentChainFromBlockRequestMessage)
|
||||
@ -70,12 +76,6 @@
|
||||
- [UtxosByAddressesEntry](#protowire.UtxosByAddressesEntry)
|
||||
- [StopNotifyingUtxosChangedRequestMessage](#protowire.StopNotifyingUtxosChangedRequestMessage)
|
||||
- [StopNotifyingUtxosChangedResponseMessage](#protowire.StopNotifyingUtxosChangedResponseMessage)
|
||||
- [RpcTransaction](#protowire.RpcTransaction)
|
||||
- [RpcTransactionInput](#protowire.RpcTransactionInput)
|
||||
- [RpcScriptPublicKey](#protowire.RpcScriptPublicKey)
|
||||
- [RpcTransactionOutput](#protowire.RpcTransactionOutput)
|
||||
- [RpcOutpoint](#protowire.RpcOutpoint)
|
||||
- [RpcUtxoEntry](#protowire.RpcUtxoEntry)
|
||||
- [GetUtxosByAddressesRequestMessage](#protowire.GetUtxosByAddressesRequestMessage)
|
||||
- [GetUtxosByAddressesResponseMessage](#protowire.GetUtxosByAddressesResponseMessage)
|
||||
- [GetVirtualSelectedParentBlueScoreRequestMessage](#protowire.GetVirtualSelectedParentBlueScoreRequestMessage)
|
||||
@ -83,6 +83,9 @@
|
||||
- [NotifyVirtualSelectedParentBlueScoreChangedRequestMessage](#protowire.NotifyVirtualSelectedParentBlueScoreChangedRequestMessage)
|
||||
- [NotifyVirtualSelectedParentBlueScoreChangedResponseMessage](#protowire.NotifyVirtualSelectedParentBlueScoreChangedResponseMessage)
|
||||
- [VirtualSelectedParentBlueScoreChangedNotificationMessage](#protowire.VirtualSelectedParentBlueScoreChangedNotificationMessage)
|
||||
- [NotifyVirtualDaaScoreChangedRequestMessage](#protowire.NotifyVirtualDaaScoreChangedRequestMessage)
|
||||
- [NotifyVirtualDaaScoreChangedResponseMessage](#protowire.NotifyVirtualDaaScoreChangedResponseMessage)
|
||||
- [VirtualDaaScoreChangedNotificationMessage](#protowire.VirtualDaaScoreChangedNotificationMessage)
|
||||
- [NotifyPruningPointUTXOSetOverrideRequestMessage](#protowire.NotifyPruningPointUTXOSetOverrideRequestMessage)
|
||||
- [NotifyPruningPointUTXOSetOverrideResponseMessage](#protowire.NotifyPruningPointUTXOSetOverrideResponseMessage)
|
||||
- [PruningPointUTXOSetOverrideNotificationMessage](#protowire.PruningPointUTXOSetOverrideNotificationMessage)
|
||||
@ -132,6 +135,218 @@ Receivers of any ResponseMessage are expected to check whether its error field i
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcBlock"></a>
|
||||
|
||||
### RpcBlock
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| header | [RpcBlockHeader](#protowire.RpcBlockHeader) | | |
|
||||
| transactions | [RpcTransaction](#protowire.RpcTransaction) | repeated | |
|
||||
| verboseData | [RpcBlockVerboseData](#protowire.RpcBlockVerboseData) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcBlockHeader"></a>
|
||||
|
||||
### RpcBlockHeader
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| version | [uint32](#uint32) | | |
|
||||
| parentHashes | [string](#string) | repeated | |
|
||||
| hashMerkleRoot | [string](#string) | | |
|
||||
| acceptedIdMerkleRoot | [string](#string) | | |
|
||||
| utxoCommitment | [string](#string) | | |
|
||||
| timestamp | [int64](#int64) | | |
|
||||
| bits | [uint32](#uint32) | | |
|
||||
| nonce | [uint64](#uint64) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcBlockVerboseData"></a>
|
||||
|
||||
### RpcBlockVerboseData
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| hash | [string](#string) | | |
|
||||
| difficulty | [double](#double) | | |
|
||||
| selectedParentHash | [string](#string) | | |
|
||||
| transactionIds | [string](#string) | repeated | |
|
||||
| isHeaderOnly | [bool](#bool) | | |
|
||||
| blueScore | [uint64](#uint64) | | |
|
||||
| childrenHashes | [string](#string) | repeated | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcTransaction"></a>
|
||||
|
||||
### RpcTransaction
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| version | [uint32](#uint32) | | |
|
||||
| inputs | [RpcTransactionInput](#protowire.RpcTransactionInput) | repeated | |
|
||||
| outputs | [RpcTransactionOutput](#protowire.RpcTransactionOutput) | repeated | |
|
||||
| lockTime | [uint64](#uint64) | | |
|
||||
| subnetworkId | [string](#string) | | |
|
||||
| gas | [uint64](#uint64) | | |
|
||||
| payload | [string](#string) | | |
|
||||
| verboseData | [RpcTransactionVerboseData](#protowire.RpcTransactionVerboseData) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcTransactionInput"></a>
|
||||
|
||||
### RpcTransactionInput
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| previousOutpoint | [RpcOutpoint](#protowire.RpcOutpoint) | | |
|
||||
| signatureScript | [string](#string) | | |
|
||||
| sequence | [uint64](#uint64) | | |
|
||||
| verboseData | [RpcTransactionInputVerboseData](#protowire.RpcTransactionInputVerboseData) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcScriptPublicKey"></a>
|
||||
|
||||
### RpcScriptPublicKey
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| version | [uint32](#uint32) | | |
|
||||
| scriptPublicKey | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcTransactionOutput"></a>
|
||||
|
||||
### RpcTransactionOutput
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| amount | [uint64](#uint64) | | |
|
||||
| scriptPublicKey | [RpcScriptPublicKey](#protowire.RpcScriptPublicKey) | | |
|
||||
| verboseData | [RpcTransactionOutputVerboseData](#protowire.RpcTransactionOutputVerboseData) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcOutpoint"></a>
|
||||
|
||||
### RpcOutpoint
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| transactionId | [string](#string) | | |
|
||||
| index | [uint32](#uint32) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcUtxoEntry"></a>
|
||||
|
||||
### RpcUtxoEntry
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| amount | [uint64](#uint64) | | |
|
||||
| scriptPublicKey | [RpcScriptPublicKey](#protowire.RpcScriptPublicKey) | | |
|
||||
| blockDaaScore | [uint64](#uint64) | | |
|
||||
| isCoinbase | [bool](#bool) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcTransactionVerboseData"></a>
|
||||
|
||||
### RpcTransactionVerboseData
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| transactionId | [string](#string) | | |
|
||||
| hash | [string](#string) | | |
|
||||
| size | [uint64](#uint64) | | |
|
||||
| blockHash | [string](#string) | | |
|
||||
| blockTime | [uint64](#uint64) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcTransactionInputVerboseData"></a>
|
||||
|
||||
### RpcTransactionInputVerboseData
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcTransactionOutputVerboseData"></a>
|
||||
|
||||
### RpcTransactionOutputVerboseData
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| scriptPublicKeyType | [string](#string) | | |
|
||||
| scriptPublicKeyAddress | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.GetCurrentNetworkRequestMessage"></a>
|
||||
|
||||
### GetCurrentNetworkRequestMessage
|
||||
@ -163,44 +378,27 @@ Possible networks are: Mainnet, Testnet, Simnet, Devnet
|
||||
<a name="protowire.SubmitBlockRequestMessage"></a>
|
||||
|
||||
### SubmitBlockRequestMessage
|
||||
|
||||
SubmitBlockRequestMessage requests to submit a block into the DAG. Blocks are generally expected to have been generated
|
||||
using the getBlockTemplate call.
|
||||
SubmitBlockRequestMessage requests to submit a block into the DAG.
|
||||
Blocks are generally expected to have been generated using the getBlockTemplate call.
|
||||
|
||||
See: GetBlockTemplateRequestMessage
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| block | [RpcBlock](#protowire.RpcBlock) | | |
|
||||
|
||||
<a name="protowire.RpcBlock"></a>
|
||||
|
||||
### RpcBlock
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| header | [RpcBlockHeader](#protowire.RpcBlockHeader) | | |
|
||||
| transactions | [RpcTransaction](#protowire.RpcTransaction) | repeated | |
|
||||
|
||||
<a name="protowire.RpcBlockHeader"></a>
|
||||
|
||||
### RpcBlockHeader
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| version | [uint32](#uint32) | | |
|
||||
| parentHashes | [string](#string) | repeated | |
|
||||
| hashMerkleRoot | [string](#string) | | |
|
||||
| acceptedIdMerkleRoot | [string](#string) | | |
|
||||
| utxoCommitment | [string](#string) | | |
|
||||
| timestamp | [int64](#int64) | | |
|
||||
| bits | [uint32](#uint32) | | |
|
||||
| nonce | [uint64](#uint64) | | |
|
||||
|
||||
<a name="protowire.SubmitBlockResponseMessage"></a>
|
||||
|
||||
### SubmitBlockResponseMessage
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| rejectReason | [SubmitBlockResponseMessage.RejectReason](#protowire.SubmitBlockResponseMessage.RejectReason) | | |
|
||||
@ -284,7 +482,7 @@ See: NotifyBlockAddedRequestMessage
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| blockVerboseData | [BlockVerboseData](#protowire.BlockVerboseData) | | |
|
||||
| block | [RpcBlock](#protowire.RpcBlock) | | |
|
||||
|
||||
|
||||
|
||||
@ -429,7 +627,7 @@ currently in the mempool.
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| fee | [uint64](#uint64) | | |
|
||||
| transactionVerboseData | [TransactionVerboseData](#protowire.TransactionVerboseData) | | |
|
||||
| transaction | [RpcTransaction](#protowire.RpcTransaction) | | |
|
||||
|
||||
|
||||
|
||||
@ -651,78 +849,8 @@ GetBlockRequestMessage requests information about a specific block
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| blockHash | [string](#string) | | |
|
||||
| blockVerboseData | [BlockVerboseData](#protowire.BlockVerboseData) | | |
|
||||
| error | [RPCError](#protowire.RPCError) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.BlockVerboseData"></a>
|
||||
|
||||
### BlockVerboseData
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| hash | [string](#string) | | |
|
||||
| block | [RpcBlock](#protowire.RpcBlock) | | |
|
||||
| transactionVerboseData | [TransactionVerboseData](#protowire.TransactionVerboseData) | repeated | |
|
||||
| difficulty | [double](#double) | | |
|
||||
| childrenHashes | [string](#string) | repeated | |
|
||||
| selectedParentHash | [string](#string) | | |
|
||||
| transactionIDs | [string](#string) | repeated | |
|
||||
| isHeaderOnly | [bool](#bool) | | |
|
||||
| blueScore | [uint64](#uint64) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.TransactionVerboseData"></a>
|
||||
|
||||
### TransactionVerboseData
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| txId | [string](#string) | | |
|
||||
| hash | [string](#string) | | |
|
||||
| size | [uint64](#uint64) | | |
|
||||
| transactionVerboseInputs | [TransactionVerboseInput](#protowire.TransactionVerboseInput) | repeated | |
|
||||
| transactionVerboseOutputs | [TransactionVerboseOutput](#protowire.TransactionVerboseOutput) | repeated | |
|
||||
| blockHash | [string](#string) | | |
|
||||
| blockTime | [uint64](#uint64) | | |
|
||||
| transaction | [RpcTransaction](#protowire.RpcTransaction) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.TransactionVerboseInput"></a>
|
||||
|
||||
### TransactionVerboseInput
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.TransactionVerboseOutput"></a>
|
||||
|
||||
### TransactionVerboseOutput
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| scriptPublicKeyType | [string](#string) | | |
|
||||
| scriptPublicKeyAddress | [string](#string) | | |
|
||||
| error | [RPCError](#protowire.RPCError) | | |
|
||||
|
||||
|
||||
|
||||
@ -805,7 +933,7 @@ kaspad's current virtual.
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| lowHash | [string](#string) | | |
|
||||
| includeBlockVerboseData | [bool](#bool) | | |
|
||||
| includeBlocks | [bool](#bool) | | |
|
||||
| includeTransactionVerboseData | [bool](#bool) | | |
|
||||
|
||||
|
||||
@ -822,7 +950,7 @@ kaspad's current virtual.
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| blockHashes | [string](#string) | repeated | |
|
||||
| blockVerboseData | [BlockVerboseData](#protowire.BlockVerboseData) | repeated | |
|
||||
| blocks | [RpcBlock](#protowire.RpcBlock) | repeated | |
|
||||
| error | [RPCError](#protowire.RPCError) | | |
|
||||
|
||||
|
||||
@ -885,6 +1013,7 @@ of this kaspad's DAG.
|
||||
| pastMedianTime | [int64](#int64) | | |
|
||||
| virtualParentHashes | [string](#string) | repeated | |
|
||||
| pruningPointHash | [string](#string) | | |
|
||||
| virtualDaaScore | [uint64](#uint64) | | |
|
||||
| error | [RPCError](#protowire.RPCError) | | |
|
||||
|
||||
|
||||
@ -1141,110 +1270,6 @@ See: UtxosChangedNotificationMessage
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcTransaction"></a>
|
||||
|
||||
### RpcTransaction
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| version | [uint32](#uint32) | | |
|
||||
| inputs | [RpcTransactionInput](#protowire.RpcTransactionInput) | repeated | |
|
||||
| outputs | [RpcTransactionOutput](#protowire.RpcTransactionOutput) | repeated | |
|
||||
| lockTime | [uint64](#uint64) | | |
|
||||
| subnetworkId | [string](#string) | | |
|
||||
| gas | [uint64](#uint64) | | |
|
||||
| payload | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcTransactionInput"></a>
|
||||
|
||||
### RpcTransactionInput
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| previousOutpoint | [RpcOutpoint](#protowire.RpcOutpoint) | | |
|
||||
| signatureScript | [string](#string) | | |
|
||||
| sequence | [uint64](#uint64) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcScriptPublicKey"></a>
|
||||
|
||||
### RpcScriptPublicKey
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| version | [uint32](#uint32) | | |
|
||||
| scriptPublicKey | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcTransactionOutput"></a>
|
||||
|
||||
### RpcTransactionOutput
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| amount | [uint64](#uint64) | | |
|
||||
| scriptPublicKey | [RpcScriptPublicKey](#protowire.RpcScriptPublicKey) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcOutpoint"></a>
|
||||
|
||||
### RpcOutpoint
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| transactionId | [string](#string) | | |
|
||||
| index | [uint32](#uint32) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.RpcUtxoEntry"></a>
|
||||
|
||||
### RpcUtxoEntry
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| amount | [uint64](#uint64) | | |
|
||||
| scriptPublicKey | [RpcScriptPublicKey](#protowire.RpcScriptPublicKey) | | |
|
||||
| blockDaaScore | [uint64](#uint64) | | |
|
||||
| isCoinbase | [bool](#bool) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.GetUtxosByAddressesRequestMessage"></a>
|
||||
|
||||
### GetUtxosByAddressesRequestMessage
|
||||
@ -1351,6 +1376,52 @@ See NotifyVirtualSelectedParentBlueScoreChangedRequestMessage
|
||||
|
||||
|
||||
|
||||
<a name="protowire.NotifyVirtualDaaScoreChangedRequestMessage"></a>
|
||||
|
||||
### NotifyVirtualDaaScoreChangedRequestMessage
|
||||
NotifyVirtualDaaScoreChangedRequestMessage registers this connection for
|
||||
virtualDaaScoreChanged notifications.
|
||||
|
||||
See: VirtualDaaScoreChangedNotificationMessage
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.NotifyVirtualDaaScoreChangedResponseMessage"></a>
|
||||
|
||||
### NotifyVirtualDaaScoreChangedResponseMessage
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| error | [RPCError](#protowire.RPCError) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.VirtualDaaScoreChangedNotificationMessage"></a>
|
||||
|
||||
### VirtualDaaScoreChangedNotificationMessage
|
||||
VirtualDaaScoreChangedNotificationMessage is sent whenever the DAA score
|
||||
of the virtual changes.
|
||||
|
||||
See NotifyVirtualDaaScoreChangedRequestMessage
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| virtualDaaScore | [uint64](#uint64) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="protowire.NotifyPruningPointUTXOSetOverrideRequestMessage"></a>
|
||||
|
||||
### NotifyPruningPointUTXOSetOverrideRequestMessage
|
||||
|
||||
@ -10,14 +10,13 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.12.3
|
||||
// source: rpc.proto
|
||||
|
||||
package protowire
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@ -31,10 +30,6 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type SubmitBlockResponseMessage_RejectReason int32
|
||||
|
||||
const (
|
||||
@ -4486,6 +4481,146 @@ func (x *VirtualSelectedParentBlueScoreChangedNotificationMessage) GetVirtualSel
|
||||
return 0
|
||||
}
|
||||
|
||||
// NotifyVirtualDaaScoreChangedRequestMessage registers this connection for
|
||||
// virtualDaaScoreChanged notifications.
|
||||
//
|
||||
// See: VirtualDaaScoreChangedNotificationMessage
|
||||
type NotifyVirtualDaaScoreChangedRequestMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *NotifyVirtualDaaScoreChangedRequestMessage) Reset() {
|
||||
*x = NotifyVirtualDaaScoreChangedRequestMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[79]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NotifyVirtualDaaScoreChangedRequestMessage) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*NotifyVirtualDaaScoreChangedRequestMessage) ProtoMessage() {}
|
||||
|
||||
func (x *NotifyVirtualDaaScoreChangedRequestMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[79]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NotifyVirtualDaaScoreChangedRequestMessage.ProtoReflect.Descriptor instead.
|
||||
func (*NotifyVirtualDaaScoreChangedRequestMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{79}
|
||||
}
|
||||
|
||||
type NotifyVirtualDaaScoreChangedResponseMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Error *RPCError `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NotifyVirtualDaaScoreChangedResponseMessage) Reset() {
|
||||
*x = NotifyVirtualDaaScoreChangedResponseMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[80]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NotifyVirtualDaaScoreChangedResponseMessage) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*NotifyVirtualDaaScoreChangedResponseMessage) ProtoMessage() {}
|
||||
|
||||
func (x *NotifyVirtualDaaScoreChangedResponseMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[80]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NotifyVirtualDaaScoreChangedResponseMessage.ProtoReflect.Descriptor instead.
|
||||
func (*NotifyVirtualDaaScoreChangedResponseMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{80}
|
||||
}
|
||||
|
||||
func (x *NotifyVirtualDaaScoreChangedResponseMessage) GetError() *RPCError {
|
||||
if x != nil {
|
||||
return x.Error
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// VirtualDaaScoreChangedNotificationMessage is sent whenever the DAA score
|
||||
// of the virtual changes.
|
||||
//
|
||||
// See NotifyVirtualDaaScoreChangedRequestMessage
|
||||
type VirtualDaaScoreChangedNotificationMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
VirtualDaaScore uint64 `protobuf:"varint,1,opt,name=virtualDaaScore,proto3" json:"virtualDaaScore,omitempty"`
|
||||
}
|
||||
|
||||
func (x *VirtualDaaScoreChangedNotificationMessage) Reset() {
|
||||
*x = VirtualDaaScoreChangedNotificationMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[81]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *VirtualDaaScoreChangedNotificationMessage) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*VirtualDaaScoreChangedNotificationMessage) ProtoMessage() {}
|
||||
|
||||
func (x *VirtualDaaScoreChangedNotificationMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[81]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use VirtualDaaScoreChangedNotificationMessage.ProtoReflect.Descriptor instead.
|
||||
func (*VirtualDaaScoreChangedNotificationMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{81}
|
||||
}
|
||||
|
||||
func (x *VirtualDaaScoreChangedNotificationMessage) GetVirtualDaaScore() uint64 {
|
||||
if x != nil {
|
||||
return x.VirtualDaaScore
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// NotifyPruningPointUTXOSetOverrideRequestMessage registers this connection for
|
||||
// pruning point UTXO set override notifications.
|
||||
//
|
||||
@ -4501,7 +4636,7 @@ type NotifyPruningPointUTXOSetOverrideRequestMessage struct {
|
||||
func (x *NotifyPruningPointUTXOSetOverrideRequestMessage) Reset() {
|
||||
*x = NotifyPruningPointUTXOSetOverrideRequestMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[79]
|
||||
mi := &file_rpc_proto_msgTypes[82]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -4514,7 +4649,7 @@ func (x *NotifyPruningPointUTXOSetOverrideRequestMessage) String() string {
|
||||
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) ProtoMessage() {}
|
||||
|
||||
func (x *NotifyPruningPointUTXOSetOverrideRequestMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[79]
|
||||
mi := &file_rpc_proto_msgTypes[82]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -4527,7 +4662,7 @@ func (x *NotifyPruningPointUTXOSetOverrideRequestMessage) ProtoReflect() protore
|
||||
|
||||
// Deprecated: Use NotifyPruningPointUTXOSetOverrideRequestMessage.ProtoReflect.Descriptor instead.
|
||||
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{79}
|
||||
return file_rpc_proto_rawDescGZIP(), []int{82}
|
||||
}
|
||||
|
||||
type NotifyPruningPointUTXOSetOverrideResponseMessage struct {
|
||||
@ -4541,7 +4676,7 @@ type NotifyPruningPointUTXOSetOverrideResponseMessage struct {
|
||||
func (x *NotifyPruningPointUTXOSetOverrideResponseMessage) Reset() {
|
||||
*x = NotifyPruningPointUTXOSetOverrideResponseMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[80]
|
||||
mi := &file_rpc_proto_msgTypes[83]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -4554,7 +4689,7 @@ func (x *NotifyPruningPointUTXOSetOverrideResponseMessage) String() string {
|
||||
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) ProtoMessage() {}
|
||||
|
||||
func (x *NotifyPruningPointUTXOSetOverrideResponseMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[80]
|
||||
mi := &file_rpc_proto_msgTypes[83]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -4567,7 +4702,7 @@ func (x *NotifyPruningPointUTXOSetOverrideResponseMessage) ProtoReflect() protor
|
||||
|
||||
// Deprecated: Use NotifyPruningPointUTXOSetOverrideResponseMessage.ProtoReflect.Descriptor instead.
|
||||
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{80}
|
||||
return file_rpc_proto_rawDescGZIP(), []int{83}
|
||||
}
|
||||
|
||||
func (x *NotifyPruningPointUTXOSetOverrideResponseMessage) GetError() *RPCError {
|
||||
@ -4590,7 +4725,7 @@ type PruningPointUTXOSetOverrideNotificationMessage struct {
|
||||
func (x *PruningPointUTXOSetOverrideNotificationMessage) Reset() {
|
||||
*x = PruningPointUTXOSetOverrideNotificationMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[81]
|
||||
mi := &file_rpc_proto_msgTypes[84]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -4603,7 +4738,7 @@ func (x *PruningPointUTXOSetOverrideNotificationMessage) String() string {
|
||||
func (*PruningPointUTXOSetOverrideNotificationMessage) ProtoMessage() {}
|
||||
|
||||
func (x *PruningPointUTXOSetOverrideNotificationMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[81]
|
||||
mi := &file_rpc_proto_msgTypes[84]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -4616,7 +4751,7 @@ func (x *PruningPointUTXOSetOverrideNotificationMessage) ProtoReflect() protoref
|
||||
|
||||
// Deprecated: Use PruningPointUTXOSetOverrideNotificationMessage.ProtoReflect.Descriptor instead.
|
||||
func (*PruningPointUTXOSetOverrideNotificationMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{81}
|
||||
return file_rpc_proto_rawDescGZIP(), []int{84}
|
||||
}
|
||||
|
||||
// StopNotifyingPruningPointUTXOSetOverrideRequestMessage unregisters this connection for
|
||||
@ -4634,7 +4769,7 @@ type StopNotifyingPruningPointUTXOSetOverrideRequestMessage struct {
|
||||
func (x *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) Reset() {
|
||||
*x = StopNotifyingPruningPointUTXOSetOverrideRequestMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[82]
|
||||
mi := &file_rpc_proto_msgTypes[85]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -4647,7 +4782,7 @@ func (x *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) String() string
|
||||
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) ProtoMessage() {}
|
||||
|
||||
func (x *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[82]
|
||||
mi := &file_rpc_proto_msgTypes[85]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -4660,7 +4795,7 @@ func (x *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) ProtoReflect()
|
||||
|
||||
// Deprecated: Use StopNotifyingPruningPointUTXOSetOverrideRequestMessage.ProtoReflect.Descriptor instead.
|
||||
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{82}
|
||||
return file_rpc_proto_rawDescGZIP(), []int{85}
|
||||
}
|
||||
|
||||
type StopNotifyingPruningPointUTXOSetOverrideResponseMessage struct {
|
||||
@ -4674,7 +4809,7 @@ type StopNotifyingPruningPointUTXOSetOverrideResponseMessage struct {
|
||||
func (x *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) Reset() {
|
||||
*x = StopNotifyingPruningPointUTXOSetOverrideResponseMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[83]
|
||||
mi := &file_rpc_proto_msgTypes[86]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -4687,7 +4822,7 @@ func (x *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) String() strin
|
||||
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) ProtoMessage() {}
|
||||
|
||||
func (x *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[83]
|
||||
mi := &file_rpc_proto_msgTypes[86]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -4700,7 +4835,7 @@ func (x *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) ProtoReflect()
|
||||
|
||||
// Deprecated: Use StopNotifyingPruningPointUTXOSetOverrideResponseMessage.ProtoReflect.Descriptor instead.
|
||||
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{83}
|
||||
return file_rpc_proto_rawDescGZIP(), []int{86}
|
||||
}
|
||||
|
||||
func (x *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) GetError() *RPCError {
|
||||
@ -4722,7 +4857,7 @@ type BanRequestMessage struct {
|
||||
func (x *BanRequestMessage) Reset() {
|
||||
*x = BanRequestMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[84]
|
||||
mi := &file_rpc_proto_msgTypes[87]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -4735,7 +4870,7 @@ func (x *BanRequestMessage) String() string {
|
||||
func (*BanRequestMessage) ProtoMessage() {}
|
||||
|
||||
func (x *BanRequestMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[84]
|
||||
mi := &file_rpc_proto_msgTypes[87]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -4748,7 +4883,7 @@ func (x *BanRequestMessage) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use BanRequestMessage.ProtoReflect.Descriptor instead.
|
||||
func (*BanRequestMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{84}
|
||||
return file_rpc_proto_rawDescGZIP(), []int{87}
|
||||
}
|
||||
|
||||
func (x *BanRequestMessage) GetIp() string {
|
||||
@ -4769,7 +4904,7 @@ type BanResponseMessage struct {
|
||||
func (x *BanResponseMessage) Reset() {
|
||||
*x = BanResponseMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[85]
|
||||
mi := &file_rpc_proto_msgTypes[88]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -4782,7 +4917,7 @@ func (x *BanResponseMessage) String() string {
|
||||
func (*BanResponseMessage) ProtoMessage() {}
|
||||
|
||||
func (x *BanResponseMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[85]
|
||||
mi := &file_rpc_proto_msgTypes[88]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -4795,7 +4930,7 @@ func (x *BanResponseMessage) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use BanResponseMessage.ProtoReflect.Descriptor instead.
|
||||
func (*BanResponseMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{85}
|
||||
return file_rpc_proto_rawDescGZIP(), []int{88}
|
||||
}
|
||||
|
||||
func (x *BanResponseMessage) GetError() *RPCError {
|
||||
@ -4817,7 +4952,7 @@ type UnbanRequestMessage struct {
|
||||
func (x *UnbanRequestMessage) Reset() {
|
||||
*x = UnbanRequestMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[86]
|
||||
mi := &file_rpc_proto_msgTypes[89]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -4830,7 +4965,7 @@ func (x *UnbanRequestMessage) String() string {
|
||||
func (*UnbanRequestMessage) ProtoMessage() {}
|
||||
|
||||
func (x *UnbanRequestMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[86]
|
||||
mi := &file_rpc_proto_msgTypes[89]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -4843,7 +4978,7 @@ func (x *UnbanRequestMessage) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UnbanRequestMessage.ProtoReflect.Descriptor instead.
|
||||
func (*UnbanRequestMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{86}
|
||||
return file_rpc_proto_rawDescGZIP(), []int{89}
|
||||
}
|
||||
|
||||
func (x *UnbanRequestMessage) GetIp() string {
|
||||
@ -4864,7 +4999,7 @@ type UnbanResponseMessage struct {
|
||||
func (x *UnbanResponseMessage) Reset() {
|
||||
*x = UnbanResponseMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[87]
|
||||
mi := &file_rpc_proto_msgTypes[90]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -4877,7 +5012,7 @@ func (x *UnbanResponseMessage) String() string {
|
||||
func (*UnbanResponseMessage) ProtoMessage() {}
|
||||
|
||||
func (x *UnbanResponseMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[87]
|
||||
mi := &file_rpc_proto_msgTypes[90]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -4890,7 +5025,7 @@ func (x *UnbanResponseMessage) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UnbanResponseMessage.ProtoReflect.Descriptor instead.
|
||||
func (*UnbanResponseMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{87}
|
||||
return file_rpc_proto_rawDescGZIP(), []int{90}
|
||||
}
|
||||
|
||||
func (x *UnbanResponseMessage) GetError() *RPCError {
|
||||
@ -4910,7 +5045,7 @@ type GetInfoRequestMessage struct {
|
||||
func (x *GetInfoRequestMessage) Reset() {
|
||||
*x = GetInfoRequestMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[88]
|
||||
mi := &file_rpc_proto_msgTypes[91]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -4923,7 +5058,7 @@ func (x *GetInfoRequestMessage) String() string {
|
||||
func (*GetInfoRequestMessage) ProtoMessage() {}
|
||||
|
||||
func (x *GetInfoRequestMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[88]
|
||||
mi := &file_rpc_proto_msgTypes[91]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -4936,7 +5071,7 @@ func (x *GetInfoRequestMessage) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetInfoRequestMessage.ProtoReflect.Descriptor instead.
|
||||
func (*GetInfoRequestMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{88}
|
||||
return file_rpc_proto_rawDescGZIP(), []int{91}
|
||||
}
|
||||
|
||||
type GetInfoResponseMessage struct {
|
||||
@ -4952,7 +5087,7 @@ type GetInfoResponseMessage struct {
|
||||
func (x *GetInfoResponseMessage) Reset() {
|
||||
*x = GetInfoResponseMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_proto_msgTypes[89]
|
||||
mi := &file_rpc_proto_msgTypes[92]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -4965,7 +5100,7 @@ func (x *GetInfoResponseMessage) String() string {
|
||||
func (*GetInfoResponseMessage) ProtoMessage() {}
|
||||
|
||||
func (x *GetInfoResponseMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_proto_msgTypes[89]
|
||||
mi := &file_rpc_proto_msgTypes[92]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -4978,7 +5113,7 @@ func (x *GetInfoResponseMessage) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetInfoResponseMessage.ProtoReflect.Descriptor instead.
|
||||
func (*GetInfoResponseMessage) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_proto_rawDescGZIP(), []int{89}
|
||||
return file_rpc_proto_rawDescGZIP(), []int{92}
|
||||
}
|
||||
|
||||
func (x *GetInfoResponseMessage) GetP2PId() string {
|
||||
@ -5583,6 +5718,20 @@ var file_rpc_proto_rawDesc = []byte{
|
||||
0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1e, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x65,
|
||||
0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65,
|
||||
0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x2c, 0x0a, 0x2a, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x56,
|
||||
0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x22, 0x59, 0x0a, 0x2b, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x56, 0x69, 0x72,
|
||||
0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52,
|
||||
0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x55,
|
||||
0x0a, 0x29, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f, 0x72,
|
||||
0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x76,
|
||||
0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61,
|
||||
0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x31, 0x0a, 0x2f, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50,
|
||||
0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x55, 0x54, 0x58, 0x4f, 0x53,
|
||||
0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
@ -5647,7 +5796,7 @@ func file_rpc_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_rpc_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 90)
|
||||
var file_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 93)
|
||||
var file_rpc_proto_goTypes = []interface{}{
|
||||
(SubmitBlockResponseMessage_RejectReason)(0), // 0: protowire.SubmitBlockResponseMessage.RejectReason
|
||||
(*RPCError)(nil), // 1: protowire.RPCError
|
||||
@ -5729,17 +5878,20 @@ var file_rpc_proto_goTypes = []interface{}{
|
||||
(*NotifyVirtualSelectedParentBlueScoreChangedRequestMessage)(nil), // 77: protowire.NotifyVirtualSelectedParentBlueScoreChangedRequestMessage
|
||||
(*NotifyVirtualSelectedParentBlueScoreChangedResponseMessage)(nil), // 78: protowire.NotifyVirtualSelectedParentBlueScoreChangedResponseMessage
|
||||
(*VirtualSelectedParentBlueScoreChangedNotificationMessage)(nil), // 79: protowire.VirtualSelectedParentBlueScoreChangedNotificationMessage
|
||||
(*NotifyPruningPointUTXOSetOverrideRequestMessage)(nil), // 80: protowire.NotifyPruningPointUTXOSetOverrideRequestMessage
|
||||
(*NotifyPruningPointUTXOSetOverrideResponseMessage)(nil), // 81: protowire.NotifyPruningPointUTXOSetOverrideResponseMessage
|
||||
(*PruningPointUTXOSetOverrideNotificationMessage)(nil), // 82: protowire.PruningPointUTXOSetOverrideNotificationMessage
|
||||
(*StopNotifyingPruningPointUTXOSetOverrideRequestMessage)(nil), // 83: protowire.StopNotifyingPruningPointUTXOSetOverrideRequestMessage
|
||||
(*StopNotifyingPruningPointUTXOSetOverrideResponseMessage)(nil), // 84: protowire.StopNotifyingPruningPointUTXOSetOverrideResponseMessage
|
||||
(*BanRequestMessage)(nil), // 85: protowire.BanRequestMessage
|
||||
(*BanResponseMessage)(nil), // 86: protowire.BanResponseMessage
|
||||
(*UnbanRequestMessage)(nil), // 87: protowire.UnbanRequestMessage
|
||||
(*UnbanResponseMessage)(nil), // 88: protowire.UnbanResponseMessage
|
||||
(*GetInfoRequestMessage)(nil), // 89: protowire.GetInfoRequestMessage
|
||||
(*GetInfoResponseMessage)(nil), // 90: protowire.GetInfoResponseMessage
|
||||
(*NotifyVirtualDaaScoreChangedRequestMessage)(nil), // 80: protowire.NotifyVirtualDaaScoreChangedRequestMessage
|
||||
(*NotifyVirtualDaaScoreChangedResponseMessage)(nil), // 81: protowire.NotifyVirtualDaaScoreChangedResponseMessage
|
||||
(*VirtualDaaScoreChangedNotificationMessage)(nil), // 82: protowire.VirtualDaaScoreChangedNotificationMessage
|
||||
(*NotifyPruningPointUTXOSetOverrideRequestMessage)(nil), // 83: protowire.NotifyPruningPointUTXOSetOverrideRequestMessage
|
||||
(*NotifyPruningPointUTXOSetOverrideResponseMessage)(nil), // 84: protowire.NotifyPruningPointUTXOSetOverrideResponseMessage
|
||||
(*PruningPointUTXOSetOverrideNotificationMessage)(nil), // 85: protowire.PruningPointUTXOSetOverrideNotificationMessage
|
||||
(*StopNotifyingPruningPointUTXOSetOverrideRequestMessage)(nil), // 86: protowire.StopNotifyingPruningPointUTXOSetOverrideRequestMessage
|
||||
(*StopNotifyingPruningPointUTXOSetOverrideResponseMessage)(nil), // 87: protowire.StopNotifyingPruningPointUTXOSetOverrideResponseMessage
|
||||
(*BanRequestMessage)(nil), // 88: protowire.BanRequestMessage
|
||||
(*BanResponseMessage)(nil), // 89: protowire.BanResponseMessage
|
||||
(*UnbanRequestMessage)(nil), // 90: protowire.UnbanRequestMessage
|
||||
(*UnbanResponseMessage)(nil), // 91: protowire.UnbanResponseMessage
|
||||
(*GetInfoRequestMessage)(nil), // 92: protowire.GetInfoRequestMessage
|
||||
(*GetInfoResponseMessage)(nil), // 93: protowire.GetInfoResponseMessage
|
||||
}
|
||||
var file_rpc_proto_depIdxs = []int32{
|
||||
3, // 0: protowire.RpcBlock.header:type_name -> protowire.RpcBlockHeader
|
||||
@ -5801,16 +5953,17 @@ var file_rpc_proto_depIdxs = []int32{
|
||||
1, // 56: protowire.GetUtxosByAddressesResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 57: protowire.GetVirtualSelectedParentBlueScoreResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 58: protowire.NotifyVirtualSelectedParentBlueScoreChangedResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 59: protowire.NotifyPruningPointUTXOSetOverrideResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 60: protowire.StopNotifyingPruningPointUTXOSetOverrideResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 61: protowire.BanResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 62: protowire.UnbanResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 63: protowire.GetInfoResponseMessage.error:type_name -> protowire.RPCError
|
||||
64, // [64:64] is the sub-list for method output_type
|
||||
64, // [64:64] is the sub-list for method input_type
|
||||
64, // [64:64] is the sub-list for extension type_name
|
||||
64, // [64:64] is the sub-list for extension extendee
|
||||
0, // [0:64] is the sub-list for field type_name
|
||||
1, // 59: protowire.NotifyVirtualDaaScoreChangedResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 60: protowire.NotifyPruningPointUTXOSetOverrideResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 61: protowire.StopNotifyingPruningPointUTXOSetOverrideResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 62: protowire.BanResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 63: protowire.UnbanResponseMessage.error:type_name -> protowire.RPCError
|
||||
1, // 64: protowire.GetInfoResponseMessage.error:type_name -> protowire.RPCError
|
||||
65, // [65:65] is the sub-list for method output_type
|
||||
65, // [65:65] is the sub-list for method input_type
|
||||
65, // [65:65] is the sub-list for extension type_name
|
||||
65, // [65:65] is the sub-list for extension extendee
|
||||
0, // [0:65] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_proto_init() }
|
||||
@ -6768,7 +6921,7 @@ func file_rpc_proto_init() {
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NotifyPruningPointUTXOSetOverrideRequestMessage); i {
|
||||
switch v := v.(*NotifyVirtualDaaScoreChangedRequestMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -6780,7 +6933,7 @@ func file_rpc_proto_init() {
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NotifyPruningPointUTXOSetOverrideResponseMessage); i {
|
||||
switch v := v.(*NotifyVirtualDaaScoreChangedResponseMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -6792,7 +6945,7 @@ func file_rpc_proto_init() {
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PruningPointUTXOSetOverrideNotificationMessage); i {
|
||||
switch v := v.(*VirtualDaaScoreChangedNotificationMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -6804,7 +6957,7 @@ func file_rpc_proto_init() {
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StopNotifyingPruningPointUTXOSetOverrideRequestMessage); i {
|
||||
switch v := v.(*NotifyPruningPointUTXOSetOverrideRequestMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -6816,7 +6969,7 @@ func file_rpc_proto_init() {
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StopNotifyingPruningPointUTXOSetOverrideResponseMessage); i {
|
||||
switch v := v.(*NotifyPruningPointUTXOSetOverrideResponseMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -6828,7 +6981,7 @@ func file_rpc_proto_init() {
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BanRequestMessage); i {
|
||||
switch v := v.(*PruningPointUTXOSetOverrideNotificationMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -6840,7 +6993,7 @@ func file_rpc_proto_init() {
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BanResponseMessage); i {
|
||||
switch v := v.(*StopNotifyingPruningPointUTXOSetOverrideRequestMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -6852,7 +7005,7 @@ func file_rpc_proto_init() {
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UnbanRequestMessage); i {
|
||||
switch v := v.(*StopNotifyingPruningPointUTXOSetOverrideResponseMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -6864,7 +7017,7 @@ func file_rpc_proto_init() {
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UnbanResponseMessage); i {
|
||||
switch v := v.(*BanRequestMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -6876,7 +7029,7 @@ func file_rpc_proto_init() {
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetInfoRequestMessage); i {
|
||||
switch v := v.(*BanResponseMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -6888,6 +7041,42 @@ func file_rpc_proto_init() {
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UnbanRequestMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UnbanResponseMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetInfoRequestMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetInfoResponseMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -6906,7 +7095,7 @@ func file_rpc_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 90,
|
||||
NumMessages: 93,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
||||
@ -528,6 +528,25 @@ message VirtualSelectedParentBlueScoreChangedNotificationMessage {
|
||||
uint64 virtualSelectedParentBlueScore = 1;
|
||||
}
|
||||
|
||||
// NotifyVirtualDaaScoreChangedRequestMessage registers this connection for
|
||||
// virtualDaaScoreChanged notifications.
|
||||
//
|
||||
// See: VirtualDaaScoreChangedNotificationMessage
|
||||
message NotifyVirtualDaaScoreChangedRequestMessage {
|
||||
}
|
||||
|
||||
message NotifyVirtualDaaScoreChangedResponseMessage {
|
||||
RPCError error = 1000;
|
||||
}
|
||||
|
||||
// VirtualDaaScoreChangedNotificationMessage is sent whenever the DAA score
|
||||
// of the virtual changes.
|
||||
//
|
||||
// See NotifyVirtualDaaScoreChangedRequestMessage
|
||||
message VirtualDaaScoreChangedNotificationMessage {
|
||||
uint64 virtualDaaScore = 1;
|
||||
}
|
||||
|
||||
// NotifyPruningPointUTXOSetOverrideRequestMessage registers this connection for
|
||||
// pruning point UTXO set override notifications.
|
||||
//
|
||||
|
||||
@ -0,0 +1,73 @@
|
||||
package protowire
|
||||
|
||||
import (
|
||||
"github.com/kaspanet/kaspad/app/appmessage"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func (x *KaspadMessage_NotifyVirtualDaaScoreChangedRequest) toAppMessage() (appmessage.Message, error) {
|
||||
if x == nil {
|
||||
return nil, errors.Wrapf(errorNil, "KaspadMessage_NotifyVirtualDaaScoreChangedRequest is nil")
|
||||
}
|
||||
return &appmessage.NotifyVirtualDaaScoreChangedRequestMessage{}, nil
|
||||
}
|
||||
|
||||
func (x *KaspadMessage_NotifyVirtualDaaScoreChangedRequest) fromAppMessage(_ *appmessage.NotifyVirtualDaaScoreChangedRequestMessage) error {
|
||||
x.NotifyVirtualDaaScoreChangedRequest = &NotifyVirtualDaaScoreChangedRequestMessage{}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *KaspadMessage_NotifyVirtualDaaScoreChangedResponse) toAppMessage() (appmessage.Message, error) {
|
||||
if x == nil {
|
||||
return nil, errors.Wrapf(errorNil, "KaspadMessage_NotifyVirtualDaaScoreChangedResponse is nil")
|
||||
}
|
||||
return x.NotifyVirtualDaaScoreChangedResponse.toAppMessage()
|
||||
}
|
||||
|
||||
func (x *KaspadMessage_NotifyVirtualDaaScoreChangedResponse) fromAppMessage(message *appmessage.NotifyVirtualDaaScoreChangedResponseMessage) error {
|
||||
var err *RPCError
|
||||
if message.Error != nil {
|
||||
err = &RPCError{Message: message.Error.Message}
|
||||
}
|
||||
x.NotifyVirtualDaaScoreChangedResponse = &NotifyVirtualDaaScoreChangedResponseMessage{
|
||||
Error: err,
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NotifyVirtualDaaScoreChangedResponseMessage) toAppMessage() (appmessage.Message, error) {
|
||||
if x == nil {
|
||||
return nil, errors.Wrapf(errorNil, "NotifyVirtualDaaScoreChangedResponseMessage is nil")
|
||||
}
|
||||
rpcErr, err := x.Error.toAppMessage()
|
||||
// Error is an optional field
|
||||
if err != nil && !errors.Is(err, errorNil) {
|
||||
return nil, err
|
||||
}
|
||||
return &appmessage.NotifyVirtualDaaScoreChangedResponseMessage{
|
||||
Error: rpcErr,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (x *KaspadMessage_VirtualDaaScoreChangedNotification) toAppMessage() (appmessage.Message, error) {
|
||||
if x == nil {
|
||||
return nil, errors.Wrapf(errorNil, "KaspadMessage_VirtualDaaScoreChangedNotification is nil")
|
||||
}
|
||||
return x.VirtualDaaScoreChangedNotification.toAppMessage()
|
||||
}
|
||||
|
||||
func (x *KaspadMessage_VirtualDaaScoreChangedNotification) fromAppMessage(message *appmessage.VirtualDaaScoreChangedNotificationMessage) error {
|
||||
x.VirtualDaaScoreChangedNotification = &VirtualDaaScoreChangedNotificationMessage{
|
||||
VirtualDaaScore: message.VirtualDaaScore,
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *VirtualDaaScoreChangedNotificationMessage) toAppMessage() (appmessage.Message, error) {
|
||||
if x == nil {
|
||||
return nil, errors.Wrapf(errorNil, "VirtualDaaScoreChangedNotificationMessage is nil")
|
||||
}
|
||||
return &appmessage.VirtualDaaScoreChangedNotificationMessage{
|
||||
VirtualDaaScore: x.VirtualDaaScore,
|
||||
}, nil
|
||||
}
|
||||
@ -779,6 +779,27 @@ func toRPCPayload(message appmessage.Message) (isKaspadMessage_Payload, error) {
|
||||
return nil, err
|
||||
}
|
||||
return payload, nil
|
||||
case *appmessage.NotifyVirtualDaaScoreChangedRequestMessage:
|
||||
payload := new(KaspadMessage_NotifyVirtualDaaScoreChangedRequest)
|
||||
err := payload.fromAppMessage(message)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return payload, nil
|
||||
case *appmessage.NotifyVirtualDaaScoreChangedResponseMessage:
|
||||
payload := new(KaspadMessage_NotifyVirtualDaaScoreChangedResponse)
|
||||
err := payload.fromAppMessage(message)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return payload, nil
|
||||
case *appmessage.VirtualDaaScoreChangedNotificationMessage:
|
||||
payload := new(KaspadMessage_VirtualDaaScoreChangedNotification)
|
||||
err := payload.fromAppMessage(message)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return payload, nil
|
||||
default:
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
package rpcclient
|
||||
|
||||
import (
|
||||
"github.com/kaspanet/kaspad/app/appmessage"
|
||||
routerpkg "github.com/kaspanet/kaspad/infrastructure/network/netadapter/router"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// RegisterForVirtualDaaScoreChangedNotifications sends an RPC request respective to the function's
|
||||
// name and returns the RPC server's response. Additionally, it starts listening for the appropriate notification
|
||||
// using the given handler function
|
||||
func (c *RPCClient) RegisterForVirtualDaaScoreChangedNotifications(
|
||||
onVirtualDaaScoreChanged func(notification *appmessage.VirtualDaaScoreChangedNotificationMessage)) error {
|
||||
|
||||
err := c.rpcRouter.outgoingRoute().Enqueue(appmessage.NewNotifyVirtualDaaScoreChangedRequestMessage())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
response, err := c.route(appmessage.CmdNotifyVirtualDaaScoreChangedResponseMessage).DequeueWithTimeout(c.timeout)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
notifyVirtualDaaScoreChangedResponse := response.(*appmessage.NotifyVirtualDaaScoreChangedResponseMessage)
|
||||
if notifyVirtualDaaScoreChangedResponse.Error != nil {
|
||||
return c.convertRPCError(notifyVirtualDaaScoreChangedResponse.Error)
|
||||
}
|
||||
spawn("RegisterForVirtualDaaScoreChangedNotifications", func() {
|
||||
for {
|
||||
notification, err := c.route(appmessage.CmdVirtualDaaScoreChangedNotificationMessage).Dequeue()
|
||||
if err != nil {
|
||||
if errors.Is(err, routerpkg.ErrRouteClosed) {
|
||||
break
|
||||
}
|
||||
panic(err)
|
||||
}
|
||||
VirtualDaaScoreChangedNotification := notification.(*appmessage.VirtualDaaScoreChangedNotificationMessage)
|
||||
onVirtualDaaScoreChanged(VirtualDaaScoreChangedNotification)
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestVirtualSelectedParentBlueScore(t *testing.T) {
|
||||
func TestVirtualSelectedParentBlueScoreAndVirtualDAAScore(t *testing.T) {
|
||||
// Setup a single kaspad instance
|
||||
harnessParams := &harnessParams{
|
||||
p2pAddress: p2pAddress1,
|
||||
@ -38,15 +38,30 @@ func TestVirtualSelectedParentBlueScore(t *testing.T) {
|
||||
"blue score change notifications: %s", err)
|
||||
}
|
||||
|
||||
// Register to virtual DAA score changes
|
||||
onVirtualDaaScoreChangedChan := make(chan *appmessage.VirtualDaaScoreChangedNotificationMessage)
|
||||
err = kaspad.rpcClient.RegisterForVirtualDaaScoreChangedNotifications(
|
||||
func(notification *appmessage.VirtualDaaScoreChangedNotificationMessage) {
|
||||
onVirtualDaaScoreChangedChan <- notification
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to register for virtual DAA score change notifications: %s", err)
|
||||
}
|
||||
|
||||
// Mine some blocks and make sure that the notifications
|
||||
// report correct blue score values
|
||||
// report correct values
|
||||
const blockAmountToMine = 100
|
||||
for i := 0; i < blockAmountToMine; i++ {
|
||||
mineNextBlock(t, kaspad)
|
||||
notification := <-onVirtualSelectedParentBlueScoreChangedChan
|
||||
if notification.VirtualSelectedParentBlueScore != 1+uint64(i) {
|
||||
blueScoreChangedNotification := <-onVirtualSelectedParentBlueScoreChangedChan
|
||||
if blueScoreChangedNotification.VirtualSelectedParentBlueScore != 1+uint64(i) {
|
||||
t.Fatalf("Unexpected virtual selected parent blue score. Want: %d, got: %d",
|
||||
1+uint64(i), notification.VirtualSelectedParentBlueScore)
|
||||
1+uint64(i), blueScoreChangedNotification.VirtualSelectedParentBlueScore)
|
||||
}
|
||||
daaScoreChangedNotification := <-onVirtualDaaScoreChangedChan
|
||||
if daaScoreChangedNotification.VirtualDaaScore > 1+uint64(i) {
|
||||
t.Fatalf("Unexpected virtual DAA score. Want: %d, got: %d",
|
||||
1+uint64(i), daaScoreChangedNotification.VirtualDaaScore)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user