adds a try-catch block in script processing

This commit is contained in:
Matias Alejo Garcia 2014-03-21 19:21:17 -03:00
parent 510cc22812
commit 7f674e0566
1 changed files with 9 additions and 6 deletions

View File

@ -151,7 +151,7 @@ HistoricSync.prototype.getBlockFromFile = function(cb) {
var to=0;
t.outs.forEach( function(o) {
try {
var s = new Script(o.s);
var addrs = self.sync.txDb.getAddrStr(s);
@ -159,6 +159,9 @@ HistoricSync.prototype.getBlockFromFile = function(cb) {
if (addrs.length === 1) {
objTx.out[to].addrStr = addrs[0];
}
} catch (e) {
console.log('WARN Could not processs: ' + objTx.txid ,e);
}
to++;
});
});