mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* [NOD-532] Change chain to DAG in the root package. * [NOD-532] Change chain to DAG in checkpoints.go. * [NOD-532] Change chain to DAG in blockdag. * [NOD-532] Change chain to DAG in cmd. * [NOD-532] Change chain to DAG in dagconfig. * [NOD-532] Change chain to DAG in database. * [NOD-532] Change chain to DAG in mempool. * [NOD-532] Change chain to DAG in mempool. * [NOD-532] Change chain to DAG in netsync. * [NOD-532] Change chain to DAG in rpcclient. * [NOD-532] Change chain to DAG in server. * [NOD-532] Change chain to DAG in txscript. * [NOD-532] Change chain to DAG in util. * [NOD-532] Change chain to DAG in wire. * [NOD-532] Remove block heights in dagio.go examples. * [NOD-532] Rename fakeChain to fakeDAG. * [NOD-532] Fix comments, remove unused EnableBCInfoHacks flag. * [NOD-532] Fix comments and variable names. * [NOD-532] Fix comments. * [NOD-532] Fix merge errors. * [NOD-532] Formatted project.
34 lines
945 B
Go
34 lines
945 B
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/kaspanet/kaspad/blockdag"
|
|
"github.com/kaspanet/kaspad/dagconfig"
|
|
"github.com/kaspanet/kaspad/mempool"
|
|
"github.com/kaspanet/kaspad/util"
|
|
"github.com/kaspanet/kaspad/wire"
|
|
)
|
|
|
|
// 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)
|
|
|
|
RelayInventory(invVect *wire.InvVect, data interface{})
|
|
|
|
TransactionConfirmed(tx *util.Tx)
|
|
}
|
|
|
|
// Config is a configuration struct used to initialize a new SyncManager.
|
|
type Config struct {
|
|
PeerNotifier PeerNotifier
|
|
DAG *blockdag.BlockDAG
|
|
TxMemPool *mempool.TxPool
|
|
DAGParams *dagconfig.Params
|
|
MaxPeers int
|
|
}
|