Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accounts ¶
type Accounts interface {
StateProofKeys(basics.Round) []account.StateProofRecordForRound
}
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) (*ledgercore.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. NewWorker는 노드에서 사용되는 새 Worker를 생성합니다.
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.