@@ -39,6 +39,7 @@ import (
3939 "github.com/blinklabs-io/gouroboros/protocol/chainsync"
4040 "github.com/blinklabs-io/gouroboros/protocol/handshake"
4141 "github.com/blinklabs-io/gouroboros/protocol/keepalive"
42+ "github.com/blinklabs-io/gouroboros/protocol/leiosfetch"
4243 "github.com/blinklabs-io/gouroboros/protocol/leiosnotify"
4344 "github.com/blinklabs-io/gouroboros/protocol/localstatequery"
4445 "github.com/blinklabs-io/gouroboros/protocol/localtxmonitor"
@@ -85,6 +86,8 @@ type Connection struct {
8586 handshake * handshake.Handshake
8687 keepAlive * keepalive.KeepAlive
8788 keepAliveConfig * keepalive.Config
89+ leiosFetch * leiosfetch.LeiosFetch
90+ leiosFetchConfig * leiosfetch.Config
8891 leiosNotify * leiosnotify.LeiosNotify
8992 leiosNotifyConfig * leiosnotify.Config
9093 localStateQuery * localstatequery.LocalStateQuery
@@ -209,6 +212,11 @@ func (c *Connection) KeepAlive() *keepalive.KeepAlive {
209212 return c .keepAlive
210213}
211214
215+ // LeiosFetch returns the leios-fetch protocol handler
216+ func (c * Connection ) LeiosFetch () * leiosfetch.LeiosFetch {
217+ return c .leiosFetch
218+ }
219+
212220// LeiosNotify returns the leios-notify protocol handler
213221func (c * Connection ) LeiosNotify () * leiosnotify.LeiosNotify {
214222 return c .leiosNotify
@@ -405,6 +413,7 @@ func (c *Connection) setupConnection() error {
405413 c .peerSharing = peersharing .New (protoOptions , c .peerSharingConfig )
406414 }
407415 c .leiosNotify = leiosnotify .New (protoOptions , c .leiosNotifyConfig )
416+ c .leiosFetch = leiosfetch .New (protoOptions , c .leiosFetchConfig )
408417 // Start protocols
409418 if ! c .delayProtocolStart {
410419 if (c .fullDuplex && handshakeFullDuplex ) || ! c .server {
@@ -418,6 +427,7 @@ func (c *Connection) setupConnection() error {
418427 c .peerSharing .Client .Start ()
419428 }
420429 c .leiosNotify .Client .Start ()
430+ c .leiosFetch .Client .Start ()
421431 }
422432 if (c .fullDuplex && handshakeFullDuplex ) || c .server {
423433 c .blockFetch .Server .Start ()
@@ -430,6 +440,7 @@ func (c *Connection) setupConnection() error {
430440 c .peerSharing .Server .Start ()
431441 }
432442 c .leiosNotify .Server .Start ()
443+ c .leiosFetch .Server .Start ()
433444 }
434445 }
435446 } else {
0 commit comments