Merge pull request #798 from bucko13/indexer-hasraw
move hasRaw check to txindexer
This commit is contained in:
commit
4f7e79bfdf
@ -412,8 +412,6 @@ class Indexer extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
async _addBlock(meta, block, view) {
|
async _addBlock(meta, block, view) {
|
||||||
assert(block.hasRaw(), 'Expected raw data for block.');
|
|
||||||
|
|
||||||
const start = util.bench();
|
const start = util.bench();
|
||||||
|
|
||||||
if (meta.height !== this.height + 1)
|
if (meta.height !== this.height + 1)
|
||||||
|
|||||||
@ -186,6 +186,7 @@ class TXIndexer extends Indexer {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
async indexBlock(meta, block, view) {
|
async indexBlock(meta, block, view) {
|
||||||
|
assert(block.hasRaw(), 'Expected raw data for block.');
|
||||||
const brecord = new BlockRecord({
|
const brecord = new BlockRecord({
|
||||||
block: meta.hash,
|
block: meta.hash,
|
||||||
time: block.time
|
time: block.time
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user