3df1449292
-Removes the unique constraint on the 'addr' field from the masternode collection NOTE: If you are experiencing a mongo duplicate key error while running a masternode sync, the easiest way to correct the problem is as follows: 1) #Stop the explorer 2) git pull 3) mongo 4) use explorerdb 5) db.masternodes.drop() 6) exit 7) #Restart the explorer 8) /path/to/explorer/scripts/sync.sh /path/to/node masternodes
20 lines
758 B
JavaScript
20 lines
758 B
JavaScript
var mongoose = require('mongoose'),
|
|
Schema = mongoose.Schema;
|
|
|
|
var MasternodeSchema = new Schema({
|
|
rank: { type: Number, default: 0 },
|
|
network: { type: String, default: "" },
|
|
txhash: { type: String, default: "" },
|
|
outidx : { type: Number, default: 0},
|
|
status : { type: String, default: "" },
|
|
addr: { type: String, index: true },
|
|
version : { type: Number, default: 0},
|
|
lastseen: { type: Number, default: 0 },
|
|
activetime: { type: Number, default: 0 },
|
|
lastpaid: { type: Number, default: 0 },
|
|
claim_name: { type: String, default: '', index: true },
|
|
ip_address: { type: String, default: '', index: true },
|
|
last_paid_block: {type: Number, default: 0}
|
|
}, {id: false});
|
|
|
|
module.exports = mongoose.model('Masternode', MasternodeSchema); |