code: function verifyHeader (header, previous, target, isTestnet) {
    // Use Buffer.compare when 0.10 will be drop (~ april 2016)
    var previousHash = previous === null
                         ? ZERO_HASH
                         : _sha256x2(previous).toString('hex')
    if (header.slice(4, 36).toString('hex') !== previousHash) {
      return false
    }
  
    var hash = Array.prototype.reverse.call(_sha256x2(header))
    var bits = header.readUInt32LE(72)
  
    return _verifyHeaderTarget(bits, hash, target) ||
           (!!isTestnet && header.readUInt32LE(68) - previous.readUInt32LE(68) > 20 * 60 &&
             _verifyHeaderTarget(bits, hash, getMaxTarget()))
  }
docs: Testnet is special:
  If no block has been found in 20 minutes, the difficulty automatically
  resets back to the minimum for a single block, after which it returns
  to its previous value.
  
  @param {Buffer} header
  @param {?Buffer} previous
  @param {TargetObject} target
  @param {boolean} [isTestnet=false]
  @return {boolean}