renorm
This commit is contained in:
parent
76d83e575c
commit
0395c4995c
|
@ -45,12 +45,12 @@ function getPathSome(path, arg) {
|
|||
}
|
||||
exports.getPathSome = getPathSome;
|
||||
|
||||
exports.deleteObjs = (paths) => new Promise((resolve, reject) => {
|
||||
exports.deleteObjs = (paths) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
var ops = [];
|
||||
for (i = 0; i < paths.length; i++) {
|
||||
ops.push({ type: 'del', path: paths[i] });
|
||||
}
|
||||
store.batch(ops, [resolve, reject, paths.length]);
|
||||
store.batch(ops, [resolve, reject, paths.length]);
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
2
index.js
2
index.js
|
@ -1,5 +1,5 @@
|
|||
const config = require('./config');
|
||||
const VERSION = 'v1.1.0b'
|
||||
const VERSION = 'v1.1.0b2'
|
||||
exports.VERSION = VERSION
|
||||
exports.exit = exit;
|
||||
exports.processor = processor;
|
||||
|
|
1
msa.js
1
msa.js
|
@ -7,6 +7,7 @@ const stringify = require('json-stable-stringify');
|
|||
|
||||
exports.consolidate = (num, plasma, bh) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
console.log(bh)
|
||||
store.get(['msa'], (err, result) => {
|
||||
if (err || Object.keys(result).length === 0) {
|
||||
resolve('NONE')
|
||||
|
|
|
@ -162,8 +162,8 @@ module.exports = function(client, steem, currentBlockNumber = 1, blockComputeSpe
|
|||
transactional(Vops, 0, v[2], v[3], v[4])
|
||||
} else {
|
||||
onNewBlock(num, v, v[4].witness_signature, {
|
||||
timestamp: block.timestamp,
|
||||
block_id: block.block_id,
|
||||
timestamp: v[4].timestamp,
|
||||
block_id: v[4].block_id,
|
||||
block_number: num
|
||||
})
|
||||
.then(r => {
|
||||
|
@ -175,8 +175,8 @@ module.exports = function(client, steem, currentBlockNumber = 1, blockComputeSpe
|
|||
.catch(e=>{console.log(e);cycleapi()})
|
||||
} else {
|
||||
onNewBlock(num, v, v[4].witness_signature, {
|
||||
timestamp: block.timestamp,
|
||||
block_id: block.block_id,
|
||||
timestamp: v[4].timestamp,
|
||||
block_id: v[4].block_id,
|
||||
block_number: num
|
||||
})
|
||||
.then(r => {
|
||||
|
|
9
tally.js
9
tally.js
|
@ -56,8 +56,7 @@ exports.tally = (num, plasma, isStreaming) => {
|
|||
}
|
||||
for (node in nodes) {
|
||||
var hash = '',
|
||||
when = 0,
|
||||
online = 0
|
||||
when = 0
|
||||
try {
|
||||
if(stats.ms.active_account_auths[node] && nodes[node].report.sig && nodes[node].report.sig_block == mssb){
|
||||
signatures.push(nodes[node].report.sig)
|
||||
|
@ -67,14 +66,12 @@ exports.tally = (num, plasma, isStreaming) => {
|
|||
try { if(nodes[node].report.oracle)oracleArr.push(nodes[node].report.oracle) } catch (e) {}
|
||||
try { hash = nodes[node].report.hash } catch (e) {}
|
||||
try { when = nodes[node].report.block_num } catch(e) {}
|
||||
try { online = hash && nodes[node].escrow } catch(e) {}
|
||||
if (when > (num - 50) && hash && online) {
|
||||
if (when > (num - 50) && hash) {
|
||||
tally.agreements.hashes[node] = hash
|
||||
tally.agreements.tally[hash] = 0
|
||||
} //recent and signing
|
||||
}
|
||||
|
||||
var promises = [oracle(oracleArr, num)]
|
||||
var promises = []//[oracle(oracleArr, num)]
|
||||
if(runners[config.username] && mss.expiration)verify(mss, signatures, stats.ms.active_threshold)
|
||||
for (runner in runners) {
|
||||
tally.agreements.votes++
|
||||
|
|
Loading…
Reference in New Issue