code: func (b *bridge) SleepBlocks(call otto.FunctionCall) (response otto.Value) {
  	var (
  		blocks = int64(0)
  		sleep  = int64(9999999999999999) // indefinitely
  	)
  	// Parse the input parameters for the sleep
  	nArgs := len(call.ArgumentList)
  	if nArgs == 0 {
  		throwJSException("usage: sleepBlocks(<n blocks>[, max sleep in seconds])")
  	}
  	if nArgs >= 1 {
  		if call.Argument(0).IsNumber() {
  			blocks, _ = call.Argument(0).ToInteger()
  		} else {
  			throwJSException("expected number as first argument")
  		}
  	}
  	if nArgs >= 2 {
  		if call.Argument(1).IsNumber() {
  			sleep, _ = call.Argument(1).ToInteger()
  		} else {
  			throwJSException("expected number as second argument")
  		}
  	}
  	// go through the console, this will allow web3 to call the appropriate
  	// callbacks if a delayed response or notification is received.
  	blockNumber := func() int64 {
  		result, err := call.Otto.Run("eth.blockNumber")
  		if err != nil {
  			throwJSException(err.Error())
  		}
  		block, err := result.ToInteger()
  		if err != nil {
  			throwJSException(err.Error())
  		}
  		return block
  	}
  	// Poll the current block number until either it ot a timeout is reached
  	targetBlockNr := blockNumber() + blocks
  	deadline := time.Now().Add(time.Duration(sleep) * time.Second)
  
  	for time.Now().Before(deadline) {
  		if blockNumber() >= targetBlockNr {
  			return otto.TrueValue()
  		}
  		time.Sleep(time.Second)
  	}
  	return otto.FalseValue()
  }
docs: // SleepBlocks will block the console for a specified number of new blocks optionally
  // until the given timeout is reached.