kaspad/netsync/interface.go
Svarog 369ec449a8 [NOD-509] Change organization name to kaspanet (#524)
* [NOD-509] Change organization name to kaspanet

* [NOD-509] Reorganize imports
2019-12-08 17:33:42 +02:00

36 lines
977 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
ChainParams *dagconfig.Params
DisableCheckpoints bool
MaxPeers int
}