chaindb: remove initState.
This commit is contained in:
parent
b7f82990c3
commit
aedbac0be6
@ -591,24 +591,6 @@ ChainDB.prototype.save = co(function* save(entry, block, view) {
|
||||
yield this.commit();
|
||||
});
|
||||
|
||||
/**
|
||||
* Retrieve the chain state.
|
||||
* @returns {Promise} - Returns {@link ChainState}.
|
||||
*/
|
||||
|
||||
ChainDB.prototype.initState = co(function* initState() {
|
||||
var data = yield this.db.get(layout.R);
|
||||
var state;
|
||||
|
||||
assert(data);
|
||||
|
||||
state = ChainState.fromRaw(data);
|
||||
|
||||
this.state = state;
|
||||
|
||||
return state;
|
||||
});
|
||||
|
||||
/**
|
||||
* Retrieve the tip entry from the tip record.
|
||||
* @returns {Promise} - Returns {@link ChainEntry}.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user