func (pool *FridayBlockPool) PeekTwoBlocks() (first *types.Block, second *types.Block) {
	pool.mtx.Lock()
	defer pool.mtx.Unlock()

	ulbLength := pool.ulbHandler()
	if ulbLength <= 0 {
		panic("returned invalid ulb length")
	}

	if r := pool.requesters[pool.height]; r != nil {
		first = r.getBlock()
	}
	if r := pool.requesters[pool.height+ulbLength]; r != nil {
		second = r.getBlock()
	}
	return
}
// PeekTwoBlocks returns blocks at pool.height and pool.height+ULBLength.
// 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.
PeekTwoBlocks returns blocks at pool.height and pool.height+ULBLength.
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.
// PeekTwoBlocks returns blocks at pool . height and pool . height + ULBLength . // 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 *FridayBlockPool) PeekTwoBlocks() (first *types.Block, second *types.Block) {
	pool.mtx.Lock()
	defer pool.mtx.Unlock()
	ulbLength := pool.ulbHandler()
	if ulbLength <= 0 {
		panic("returned invalid ulb length")
	}
	if r := pool.requesters[pool.height]; r != nil {
		first = r.getBlock()
	}
	if r := pool.requesters[pool.height+ulbLength]; r != nil {
		second = r.getBlock()
	}
	return
}
func ( pool * FridayBlockPool ) PeekTwoBlocks ( ) ( first * types . Block , second * types . Block ) { pool . mtx . Lock ( ) defer pool . mtx . Unlock ( ) ulbLength := pool . ulbHandler ( ) if ulbLength <= 0 { panic ( " " ) } if r := pool . requesters [ pool . height ] ; r != nil { first = r . getBlock ( ) } if r := pool . requesters [ pool . height + ulbLength ] ; r != nil { second = r . getBlock ( ) } return }
PeekTwoBlocks returns blocks at pool.height and pool.height+ULBLength.
PeekTwoBlocks returns blocks at pool . height and pool . height + ULBLength .