Files
purple-explorer/models/networkhistory.js
T
Joe Uhren 45a929b254 Tons of network chart improvements and changes
-Chart.js has been updated to v4.4.7
-The chartjs-plugin-crosshair chart plugin has been updated to v2.0.5 via a forked version that has a working sync feature which is now available as a new setting option for use with the network charts
-Added a new max_hours setting to display chart data for a certain number of hours instead of a fixed set of records which can help reveal holes in the sync process for the explorer and/or blockchain
-Added a new timestamp field to the network history collection for use with the max_hours setting chart data
-Added a number of new network chart settings to control display of the chart title, legend, a new vertical block line option, chart height, an option to force 2 charts to appear on their own row or beside each other, and an option to force a chart to take up all available space in the chart box without extra padding
-Added a new dependency chartjs-plugin-annotation v3.1.0 to display block lines in new hourly charts
2024-12-28 19:22:38 -07:00

12 lines
430 B
JavaScript

var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var NetworkHistorySchema = new Schema({
blockindex: {type: Number, default: 0, index: true},
nethash: { type: Number, default: 0 },
difficulty_pow: { type: Number, default: 0 },
difficulty_pos: { type: Number, default: 0 },
timestamp: { type: Number, default: 0 }
}, {id: false});
module.exports = mongoose.model('NetworkHistory', NetworkHistorySchema);