Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continue on "Cannot read property length of undefined" #297

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ module.exports = {
if (blockhash) {
lib.get_block(blockhash, function(block) {
if (block) {
try {
lib.syncLoop(block.tx.length, function (subloop) {
var i = subloop.iteration();
Tx.findOne({txid: block.tx[i]}, function(err, tx) {
Expand All @@ -664,6 +665,9 @@ module.exports = {
block = null;
loop.next();
});
} catch (e) {
console.log('hit an exception: %s', e);
}
} else {
console.log('block not found: %s', blockhash);
loop.next();
Expand Down