chain: improve version display. fix getLocator.
This commit is contained in:
parent
6a7c5eac8d
commit
ffec8ff2d7
@ -923,7 +923,7 @@ Chain.prototype.setBestChain = async function setBestChain(entry, block, prev, f
|
|||||||
if (entry.hasUnknown()) {
|
if (entry.hasUnknown()) {
|
||||||
this.logger.warning(
|
this.logger.warning(
|
||||||
'Unknown version bits in block %d: %d.',
|
'Unknown version bits in block %d: %d.',
|
||||||
entry.height, entry.version);
|
entry.height, util.hex32(entry.version));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, everything is in order.
|
// Otherwise, everything is in order.
|
||||||
@ -1838,8 +1838,10 @@ Chain.prototype._getLocator = async function getLocator(start) {
|
|||||||
|
|
||||||
entry = await this.db.getEntry(start);
|
entry = await this.db.getEntry(start);
|
||||||
|
|
||||||
if (!entry)
|
if (!entry) {
|
||||||
throw new Error('Tip not found.');
|
entry = this.tip;
|
||||||
|
hashes.push(start);
|
||||||
|
}
|
||||||
|
|
||||||
hash = entry.hash;
|
hash = entry.hash;
|
||||||
height = entry.height;
|
height = entry.height;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user