btcd/netsync/interface.go
Olaoluwa Osuntokun caac0f821a
multi: update btcutil imports to point to new sub-module
In this commit, we update all the btcutil imports to point to the new
sub-module.

In the same commit, we also modify the recently added `btcutil/go.mod`
file as we need to continue pointing to the _old_ version of btcd, until
we merge this PR and push a new tag.
2022-01-10 18:44:58 -08:00

42 lines
1.2 KiB
Go

// Copyright (c) 2017 The btcsuite developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package netsync
import (
"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/mempool"
"github.com/btcsuite/btcd/peer"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/btcutil"
)
// PeerNotifier exposes methods to notify peers of status changes to
// transactions, blocks, etc. Currently server (in the main package) implements
// this interface.
type PeerNotifier interface {
AnnounceNewTransactions(newTxs []*mempool.TxDesc)
UpdatePeerHeights(latestBlkHash *chainhash.Hash, latestHeight int32, updateSource *peer.Peer)
RelayInventory(invVect *wire.InvVect, data interface{})
TransactionConfirmed(tx *btcutil.Tx)
}
// Config is a configuration struct used to initialize a new SyncManager.
type Config struct {
PeerNotifier PeerNotifier
Chain *blockchain.BlockChain
TxMemPool *mempool.TxPool
ChainParams *chaincfg.Params
DisableCheckpoints bool
MaxPeers int
FeeEstimator *mempool.FeeEstimator
}