Adding documentation comments and a few small fixes.

This commit is contained in:
херетик
2023-06-02 10:06:12 +01:00
parent 8ab1238d9d
commit 1b64b0d3e7
23 changed files with 194 additions and 110 deletions

View File

@@ -15,6 +15,8 @@ var (
fails = log.E.Chk
)
// Ad is an interface for the signed messages stored in the PeerStore of the
// libp2p host inside an indra engine.
type Ad interface {
coding.Codec
Splice(s *splice.Splice)
@@ -22,6 +24,10 @@ type Ad interface {
Gossip(sm *sess.Manager, c qu.C)
}
// Gossip writes a new Ad out to the p2p network.
//
// todo: this will be changed to use the engine host peer store. An interface
// will be required.
func Gossip(x Ad, sm *sess.Manager, c qu.C) {
done := qu.T()
msg := splice.New(x.Len())