diff options
Diffstat (limited to 'agreement/demux.go')
-rw-r--r-- | agreement/demux.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/agreement/demux.go b/agreement/demux.go index 7f888dc97..33e15e6cf 100644 --- a/agreement/demux.go +++ b/agreement/demux.go @@ -1,4 +1,4 @@ -// Copyright (C) 2019-2023 Algorand, Inc. +// Copyright (C) 2019-2024 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify @@ -19,6 +19,7 @@ package agreement import ( "context" "fmt" + "io" "github.com/algorand/go-algorand/config" "github.com/algorand/go-algorand/logging" @@ -361,6 +362,17 @@ func (d *demux) next(s *Service, deadline Deadline, fastDeadline Deadline, curre return } +// dumpQueues dumps the current state of the demux queues to the given writer. +func (d *demux) dumpQueues(w io.Writer) { + fmt.Fprintf(w, "rawVotes: %d\n", len(d.rawVotes)) + fmt.Fprintf(w, "rawProposals: %d\n", len(d.rawProposals)) + fmt.Fprintf(w, "rawBundles: %d\n", len(d.rawBundles)) + + fmt.Fprintf(w, "cryptoVerifiedVotes: %d\n", len(d.crypto.VerifiedVotes())) + fmt.Fprintf(w, "cryptoVerified ProposalPayloadTag: %d\n", len(d.crypto.Verified(protocol.ProposalPayloadTag))) + fmt.Fprintf(w, "cryptoVerified VoteBundleTag: %d\n", len(d.crypto.Verified(protocol.VoteBundleTag))) +} + // setupCompoundMessage processes compound messages: distinct messages which are delivered together func setupCompoundMessage(l LedgerReader, m message) (res externalEvent) { compound := m.CompoundMessage |