s/Validation/Commit/g

This commit is contained in:
Jae Kwon
2016-04-02 09:10:16 -07:00
parent daa76dcff0
commit f17c4c1d57
13 changed files with 206 additions and 234 deletions

View File

@ -149,8 +149,9 @@ func (pool *BlockPool) IsCaughtUp() bool {
return isCaughtUp
}
// We need to see the second block's Validation to validate the first block.
// We need to see the second block's Commit to validate the first block.
// So we peek two blocks at a time.
// The caller will verify the commit.
func (pool *BlockPool) PeekTwoBlocks() (first *types.Block, second *types.Block) {
pool.mtx.Lock() // Lock
defer pool.mtx.Unlock()
@ -165,7 +166,7 @@ func (pool *BlockPool) PeekTwoBlocks() (first *types.Block, second *types.Block)
}
// Pop the first block at pool.height
// It must have been validated by 'second'.Validation from PeekTwoBlocks().
// It must have been validated by 'second'.Commit from PeekTwoBlocks().
func (pool *BlockPool) PopRequest() {
pool.mtx.Lock() // Lock
defer pool.mtx.Unlock()