code: function ChainDB(options) {
    if (!(this instanceof ChainDB))
      return new ChainDB(options);
  
    EventEmitter.call(this);
  
    this.options = options;
    this.network = this.options.network;
    this.logger = this.options.logger.context('chaindb');
  
    this.db = LDB(this.options);
    this.stateCache = new StateCache(this.network);
    this.state = new ChainState();
  
    this.pending = null;
    this.current = null;
  
    this.coinCache = new LRU(this.options.coinCache, getSize);
    this.cacheHash = new LRU(this.options.entryCache);
    this.cacheHeight = new LRU(this.options.entryCache);
  }
docs: The database backend for the {@link Chain} object.
  @alias module:blockchain.ChainDB
  @constructor
  @param {Boolean?} options.prune - Whether to prune the chain.
  @param {Boolean?} options.spv - SPV-mode, will not save block
  data, only entries.
  @param {String?} options.name - Database name
  @param {String?} options.location - Database location
  @param {String?} options.db - Database backend name
  @property {Boolean} prune
  @emits ChainDB#open
  @emits ChainDB#error