Skip to content

Commit

Permalink
don't flush on each new block in regtest
Browse files Browse the repository at this point in the history
  • Loading branch information
BrannonKing committed Nov 10, 2021
1 parent ffb1d1f commit 23b1aa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion blockchain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,8 @@ func (b *BlockChain) connectBlock(node *blockNode, block *btcutil.Block,

// Handle LBRY Claim Scripts
if b.claimTrie != nil {
if err := b.ParseClaimScripts(block, node, view, current); err != nil {
shouldFlush := current && b.chainParams.Net != wire.TestNet
if err := b.ParseClaimScripts(block, node, view, shouldFlush); err != nil {
return ruleError(ErrBadClaimTrie, err.Error())
}
}
Expand Down
2 changes: 1 addition & 1 deletion mining/cpuminer/cpuminer.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,6 @@ func New(cfg *Config) *CPUMiner {
numWorkers: defaultNumWorkers,
updateNumWorkers: make(chan struct{}),
queryHashesPerSec: make(chan float64),
updateHashes: make(chan uint64),
updateHashes: make(chan uint64, 512),
}
}

0 comments on commit 23b1aa4

Please sign in to comment.