Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accounts ¶
type Accounts interface {
Keys(basics.Round) []account.Participation
}
Accounts captures the aspects of the AccountManager that are used by this package.
type Ledger ¶
type Ledger interface { Latest() basics.Round Wait(basics.Round) chan struct{} GenesisHash() crypto.Digest BlockHdr(basics.Round) (bookkeeping.BlockHeader, error) CompactCertVoters(basics.Round) (*ledger.VotersForRound, error) }
Ledger captures the aspects of the ledger that are used by this package.
type Network ¶
type Network interface { Broadcast(context.Context, protocol.Tag, []byte, bool, network.Peer) error RegisterHandlers([]network.TaggedMessageHandler) }
Network captures the aspects of the gossip network protocol that are used by this package.
type TransactionSender ¶
type TransactionSender interface {
BroadcastSignedTxGroup([]transactions.SignedTxn) error
}
TransactionSender is an interface that captures the node's ability to broadcast a new transaction.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker builds compact certificates, by broadcasting signatures using this node's participation keys, by collecting signatures sent by others, and by sending out the resulting compact certs in a transaction.
func NewWorker ¶
func NewWorker(db db.Accessor, log logging.Logger, accts Accounts, ledger Ledger, net Network, txnSender TransactionSender) *Worker
NewWorker constructs a new Worker, as used by the node.
func (*Worker) LatestSigsFromThisNode ¶
LatestSigsFromThisNode returns information about compact cert signatures from this node's participation keys that are already stored durably on disk. In particular, we return the round nunmber of the latest block signed with each account's participation key. This is intended for use by the ephemeral key logic: since we already have these signatures stored on disk, it is safe to delete the corresponding ephemeral private keys.