This commit is contained in:
Jeffrey Wilcke 2015-07-21 08:46:21 +00:00
commit a7aa704039

View file

@ -582,6 +582,15 @@ func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) {
} }
bstart := time.Now() bstart := time.Now()
// Recover signatures in parallel
var wg sync.WaitGroup
wg.Add(len(block.Transactions()))
for _, tx := range block.Transactions() {
go func(tx *types.Transaction) { defer wg.Done(); tx.From() }(tx)
}
wg.Wait()
// Wait for block i's nonce to be verified before processing // Wait for block i's nonce to be verified before processing
// its state transition. // its state transition.
for !nonceChecked[i] { for !nonceChecked[i] {