1 // Copyright (c) 2017 The btcsuite developers
2 // Use of this source code is governed by an ISC
3 // license that can be found in the LICENSE file.
8 "github.com/btcsuite/btcd/blockchain"
9 "github.com/btcsuite/btcd/chaincfg"
10 "github.com/btcsuite/btcd/chaincfg/chainhash"
11 "github.com/btcsuite/btcd/mempool"
12 "github.com/btcsuite/btcd/peer"
13 "github.com/btcsuite/btcd/wire"
14 "github.com/btcsuite/btcutil"
17 // PeerNotifier exposes methods to notify peers of status changes to
18 // transactions, blocks, etc. Currently server (in the main package) implements
20 type PeerNotifier interface {
21 AnnounceNewTransactions(newTxs []*mempool.TxDesc)
23 UpdatePeerHeights(latestBlkHash *chainhash.Hash, latestHeight int32, updateSource *peer.Peer)
25 RelayInventory(invVect *wire.InvVect, data interface{})
27 TransactionConfirmed(tx *btcutil.Tx)
30 // Config is a configuration struct used to initialize a new SyncManager.
32 PeerNotifier PeerNotifier
33 Chain *blockchain.BlockChain
34 TxMemPool *mempool.TxPool
35 ChainParams *chaincfg.Params
37 DisableCheckpoints bool