@@ -96,17 +96,15 @@ TransactionSchema.statics.createFromArray = function(txs, next) {
9696 async . forEachLimit ( txs , CONCURRENCY , function ( txid , cb ) {
9797
9898 that . explodeTransactionItems ( txid , function ( err ) {
99+ if ( err ) return next ( err ) ;
99100
100101 that . create ( { txid : txid , time : now } , function ( err , new_tx ) {
101-
102- //console.log("created:", err, new_tx);
103-
104102 if ( err && ! err . toString ( ) . match ( / E 1 1 0 0 0 / ) ) return cb ( err ) ;
105103
106104 if ( new_tx ) mongo_txs . push ( new_tx ) ;
107105 return cb ( ) ;
108106 } ) ;
109- } )
107+ } ) ;
110108 } ,
111109 function ( err ) {
112110 return next ( err , mongo_txs ) ;
@@ -117,8 +115,6 @@ TransactionSchema.statics.createFromArray = function(txs, next) {
117115TransactionSchema . statics . explodeTransactionItems = function ( txid , cb ) {
118116
119117 this . queryInfo ( txid , function ( err , info ) {
120-
121- //console.log("INFO",info);
122118 if ( err || ! info ) return cb ( err ) ;
123119
124120 var index = 0 ;
@@ -168,7 +164,8 @@ TransactionSchema.statics.explodeTransactionItems = function(txid, cb) {
168164 }
169165 } ,
170166 function ( err ) {
171- return cb ( err ) ;
167+ if ( err && ! err . toString ( ) . match ( / E 1 1 0 0 0 / ) ) return cb ( err ) ;
168+ return cb ( ) ;
172169 } ) ;
173170 } ) ;
174171 } ) ;
0 commit comments