mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 09:42:22 +00:00
network: refactor blockqueuer interface
Remove unused argument.
This commit is contained in:
parent
e57e74692f
commit
91a77c25a2
3 changed files with 4 additions and 4 deletions
|
@ -37,7 +37,7 @@ func indexToPosition(i uint32) int {
|
|||
return int(i) % blockCacheSize
|
||||
}
|
||||
|
||||
func newBlockQueue(capacity int, bc Blockqueuer, log *zap.Logger, relayer func(*block.Block)) *blockQueue {
|
||||
func newBlockQueue(bc Blockqueuer, log *zap.Logger, relayer func(*block.Block)) *blockQueue {
|
||||
if log == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
func TestBlockQueue(t *testing.T) {
|
||||
chain := fakechain.NewFakeChain()
|
||||
// notice, it's not yet running
|
||||
bq := newBlockQueue(0, chain, zaptest.NewLogger(t), nil)
|
||||
bq := newBlockQueue(chain, zaptest.NewLogger(t), nil)
|
||||
blocks := make([]*block.Block, 11)
|
||||
for i := 1; i < 11; i++ {
|
||||
blocks[i] = &block.Block{Header: block.Header{Index: uint32(i)}}
|
||||
|
|
|
@ -204,11 +204,11 @@ func newServerFromConstructors(config ServerConfig, chain Ledger, stSync StateSy
|
|||
}, s.notaryFeer)
|
||||
})
|
||||
}
|
||||
s.bQueue = newBlockQueue(maxBlockBatch, chain, log, func(b *block.Block) {
|
||||
s.bQueue = newBlockQueue(chain, log, func(b *block.Block) {
|
||||
s.tryStartServices()
|
||||
})
|
||||
|
||||
s.bSyncQueue = newBlockQueue(maxBlockBatch, s.stateSync, log, nil)
|
||||
s.bSyncQueue = newBlockQueue(s.stateSync, log, nil)
|
||||
|
||||
if s.MinPeers < 0 {
|
||||
s.log.Info("bad MinPeers configured, using the default value",
|
||||
|
|
Loading…
Reference in a new issue