d86beee960
-New settings allow reading of the hash algorithm used to mine a particular block for coins that support this feature and have the algorithm data stored in the raw block data -An "Algorithm" column has been added to the block page and main transaction homepage when multi-algo data is enabled -The /ext/getlasttxs api will now return the hash algorithm if reading of the multi-algo data is enabled
19 lines
712 B
JavaScript
19 lines
712 B
JavaScript
var mongoose = require('mongoose'),
|
|
Schema = mongoose.Schema;
|
|
|
|
var TxSchema = new Schema({
|
|
txid: { type: String, lowercase: true, unique: true, index: true},
|
|
vin: { type: Array, default: [] },
|
|
vout: { type: Array, default: [] },
|
|
total: { type: Number, default: 0, index: true },
|
|
timestamp: { type: Number, default: 0, index: true },
|
|
blockhash: { type: String, index: true },
|
|
blockindex: {type: Number, default: 0, index: true},
|
|
tx_type: { type: String, default: null },
|
|
op_return: { type: String, default: null },
|
|
algo: { type: String, default: null }
|
|
}, {id: false});
|
|
|
|
TxSchema.index({total: 1, total: -1, blockindex: 1, blockindex: -1});
|
|
|
|
module.exports = mongoose.model('Tx', TxSchema); |