AvalonMonoScripts/tipsLessThan20SinceAugust16th.js

35 lines
519 B
JavaScript
Raw Normal View History

2021-09-08 11:14:22 +00:00
mongo = require("./mongoHelp.js")
// August 16th 2021
// 1629061200000
agg = [
{
'$unwind': {
'path': '$txs',
'preserveNullAndEmptyArrays': false
}
}, {
'$match': {
'timestamp': {
'$gt': 1629061200000
}
}
}, {
'$match': {
'txs.type': 19
}
}, {
'$match': {
'txs.data.tip': {
'$lt': 20
}
}
}
]
mongo.aggregate('avalon5', 'blocks', agg).then(res => {
res.forEach(element => {
console.log(element)
})
})