Skip to content

Commit

Permalink
embed the allowlist into boundedblockservice
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan committed Aug 16, 2023
1 parent 3b6a259 commit 889fb50
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions blockservice/blockservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ type BlockService interface {
// BoundedBlockService is a Blockservice bounded via strict multihash Allowlist.
type BoundedBlockService interface {
BlockService

Allowlist() verifcid.Allowlist
verifcid.Allowlist
}

type blockService struct {
Expand Down Expand Up @@ -147,7 +146,7 @@ func (s *blockService) Allowlist() verifcid.Allowlist {
func NewSession(ctx context.Context, bs BlockService) *Session {
allowlist := verifcid.Allowlist(verifcid.DefaultAllowlist)
if bbs, ok := bs.(BoundedBlockService); ok {
allowlist = bbs.Allowlist()
allowlist = bbs
}
exch := bs.Exchange()
if sessEx, ok := exch.(exchange.SessionExchange); ok {
Expand Down

0 comments on commit 889fb50

Please sign in to comment.