Skip to content

Commit

Permalink
bus: broadcast block outline
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Aug 12, 2024
1 parent f8480e4 commit 708c7c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bus/bus.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ type (
Block(id types.BlockID) (types.Block, bool)
PoolTransaction(txid types.TransactionID) (types.Transaction, bool)
PoolTransactions() []types.Transaction
V2PoolTransactions() []types.V2Transaction
RecommendedFee() types.Currency
TipState() consensus.State
UnconfirmedParents(txn types.Transaction) []types.Transaction
Expand Down Expand Up @@ -206,6 +207,7 @@ type (
Syncer interface {
Addr() string
BroadcastHeader(h gateway.BlockHeader)
BroadcastV2BlockOutline(bo gateway.V2BlockOutline)
BroadcastTransactionSet([]types.Transaction)
BroadcastV2TransactionSet(index types.ChainIndex, txns []types.V2Transaction)
Connect(ctx context.Context, addr string) (*syncer.Peer, error)
Expand Down Expand Up @@ -456,6 +458,8 @@ func (b *bus) consensusAcceptBlock(jc jape.Context) {
Timestamp: block.Timestamp,
MerkleRoot: block.MerkleRoot(),
})
} else {
b.s.BroadcastV2BlockOutline(gateway.OutlineBlock(block, b.cm.PoolTransactions(), b.cm.V2PoolTransactions()))
}
}

Expand Down
1 change: 1 addition & 0 deletions internal/node/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Syncer interface {
io.Closer
Addr() string
BroadcastHeader(h gateway.BlockHeader)
BroadcastV2BlockOutline(bo gateway.V2BlockOutline)
BroadcastTransactionSet([]types.Transaction)
BroadcastV2TransactionSet(index types.ChainIndex, txns []types.V2Transaction)
Connect(ctx context.Context, addr string) (*syncer.Peer, error)
Expand Down

0 comments on commit 708c7c4

Please sign in to comment.