This commit is contained in:
aozhiwei 2022-04-21 23:36:27 +08:00
parent 25405a959c
commit f39d425a94
2 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,7 @@
const app = require('j7/app');
const utils = require('j7/utils');
const bcutils = require('j7/bcutils');
const log = require('j7/log');
const serviceFactory = require('./factory');
const metaFactory = require('../metadata/factory');
const bc = require('../blockchain');
@ -64,7 +65,7 @@ class EventCenter {
maxIdx = row['max_idx'];
}
}
while (Object.keys(this.pendingConfirmOwnerHash) > 50) {
while (Object.keys(this.pendingConfirmOwnerHash).length > 50) {
await utils.sleep(1000 + utils.randRange(500, 1500));
}
await utils.sleep(2000 + utils.randRange(500, 1500));

View File

@ -1,6 +1,7 @@
const bcutils = require('j7/bcutils');
const utils = require('j7/utils');
const app = require('j7/app');
const log = require('j7/log');
const bc = require('../blockchain');
class ExecConfirmOwner {
@ -99,6 +100,7 @@ class ExecConfirmOwner {
async getOwner() {
const instanceName = this.getInstanceName();
//log.info('getOwner:' + instanceName + ' tryCount:' + this.tryCount);
while (true) {
await bc.lockQuery();
try {