add waitgroups to ingestBlock
seems to go a little faster but not much. making ingest tx take a slice of txs would be faster probably. but it seems network i/o is the limiting factor so maybe it's OK
This commit is contained in:
1 parent
4535b965cd
commit
e2dd892a4f
6 files changed
+26
-17
No files matched your search
+3
-2
@@ -13,10 +13,11 @@ import (
|
||||
|
||||
// OpenPV starts a
|
||||
func OpenSPV(remoteNode string, hfn, dbfn string,
|
||||
inTs *TxStore, hard bool, p *chaincfg.Params) (SPVCon, error) {
|
||||
inTs *TxStore, hard bool, iron bool, p *chaincfg.Params) (SPVCon, error) {
|
||||
// create new SPVCon
|
||||
var s SPVCon
|
||||
s.HardMode = hard
|
||||
s.Ironman = iron
|
||||
// I should really merge SPVCon and TxStore, they're basically the same
|
||||
inTs.Param = p
|
||||
s.TS = inTs // copy pointer of txstore into spvcon
|
||||
@@ -84,7 +85,7 @@ func OpenSPV(remoteNode string, hfn, dbfn string,
|
||||
s.outMsgQueue = make(chan wire.Message)
|
||||
go s.outgoingMessageHandler()
|
||||
s.blockQueue = make(chan HashAndHeight, 32) // queue depth 32 is a thing
|
||||
s.fPositives = make(chan int32, 4000) // a block full, approx
|
||||
s.fPositives = make(chan int32, 4000) // a block full, approx
|
||||
s.inWaitState = make(chan bool, 1)
|
||||
go s.fPositiveHandler()
|
||||
|
||||
|
||||
Reference in new issue
Block a user