mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-23 06:18:34 +02:00
New share handler again. With catch for error.
This commit is contained in:
+5
-1
@@ -274,7 +274,11 @@ function Database(){
|
|||||||
let sharesSeen = 0;
|
let sharesSeen = 0;
|
||||||
shares[key].forEach(function(final_share){
|
shares[key].forEach(function(final_share){
|
||||||
sharesSeen += 1;
|
sharesSeen += 1;
|
||||||
txn.putBinary(global.database.shareDB, parseInt(key), global.protos.Share.encode(final_share));
|
try {
|
||||||
|
txn.putBinary(global.database.shareDB, parseInt(key), global.protos.Share.encode(final_share));
|
||||||
|
} catch (e) {
|
||||||
|
debug(final_share);
|
||||||
|
}
|
||||||
if (Object.keys(shares).length === blocksSeen && sharesSeen === shares[key].length){
|
if (Object.keys(shares).length === blocksSeen && sharesSeen === shares[key].length){
|
||||||
debug('Made it to where I can do the insert');
|
debug('Made it to where I can do the insert');
|
||||||
txn.commit();
|
txn.commit();
|
||||||
|
|||||||
Reference in New Issue
Block a user