Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructLastAnchor ¶
func ConstructLastAnchor(ctx context.Context, batch *database.Batch, partition *url.URL) (protocol.AnchorBody, uint64, error)
ConstructLastAnchor constructs an anchor for the previous block. This *must* be called with a batch created during BeginBlock, prior to updating any database records.
Types ¶
type Conductor ¶
type Conductor struct { Partition *protocol.PartitionInfo Globals atomic.Pointer[network.GlobalValues] ValidatorKey ed25519.PrivateKey Database database.Beginner Querier api.Querier2 Dispatcher execute.Dispatcher // Ready can be used to pause the conductor, for example to stop it from // sending anchors while the node is catching up. Ready func(execute.WillBeginBlock) bool // RunTask launches a background task. The caller may use this to wait for // completion of launched tasks. RunTask func(func()) // **FOR TESTING PURPOSES ONLY**. Tells the conductor not to skip sending // the anchor the first time around. DropInitialAnchor bool // Enables healing of anchors after they are initially submitted. EnableAnchorHealing *bool // **FOR TESTING PURPOSES ONLY**. Intercepts dispatched envelopes. Intercept interceptor }
type ValidatorContext ¶
type ValidatorContext struct { Source *protocol.PartitionInfo Globals *network.GlobalValues ValidatorKey ed25519.PrivateKey }
func (ValidatorContext) PrepareAnchorSubmission ¶
func (x ValidatorContext) PrepareAnchorSubmission(ctx context.Context, anchor protocol.AnchorBody, sequenceNumber uint64, destination *url.URL) (*messaging.Envelope, *protocol.Transaction, error)
Click to show internal directories.
Click to hide internal directories.