diff options
Diffstat (limited to 'block_manager.go')
-rw-r--r-- | block_manager.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block_manager.go b/block_manager.go index 80b30eff6..a60d4340d 100644 --- a/block_manager.go +++ b/block_manager.go @@ -26,9 +26,12 @@ func NewBlockManager() *BlockManager { // Process a block. func (bm *BlockManager) ProcessBlock(block *Block) error { + // Get the tx count. Used to create enough channels to 'join' the go routines txCount := len(block.transactions) + // Locking channel. When it has been fully buffered this method will return lockChan := make(chan bool, txCount) + // Process each transaction/contract for _, tx := range block.transactions { go bm.ProcessTransaction(tx, lockChan) } |