show timestamp for unconfirmed transactions
This commit is contained in:
parent
86e149a0d8
commit
914671e352
|
@ -9,7 +9,6 @@ module.exports.init = function(app, io_ext) {
|
|||
ios.set('log level', 1); // reduce logging
|
||||
ios.sockets.on('connection', function(socket) {
|
||||
socket.on('subscribe', function(topic) {
|
||||
console.log('subscribe to '+topic);
|
||||
socket.join(topic);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@ var async = require('async');
|
|||
|
||||
|
||||
/**
|
||||
* Find block by hash ...
|
||||
* Find transaction by hash ...
|
||||
*/
|
||||
exports.transaction = function(req, res, next, txid) {
|
||||
Transaction.fromIdWithInfo(txid, function(err, tx) {
|
||||
|
|
|
@ -110,7 +110,10 @@ TransactionSchema.statics.createFromArray = function(txs, time, next) {
|
|||
that.create({txid: txid, time: time}, function(err, new_tx) {
|
||||
if (err && ! err.toString().match(/E11000/)) return cb(err);
|
||||
|
||||
if (new_tx) mongo_txs.push(new_tx);
|
||||
if (new_tx) {
|
||||
mongo_txs.push(new_tx);
|
||||
}
|
||||
|
||||
return cb();
|
||||
});
|
||||
});
|
||||
|
@ -336,6 +339,7 @@ TransactionSchema.methods.fillInfo = function(next) {
|
|||
if (err) return next(err);
|
||||
|
||||
that.info = info;
|
||||
that.info.time = that.time;
|
||||
return next();
|
||||
});
|
||||
};
|
||||
|
|
|
@ -69,8 +69,7 @@ function spec() {
|
|||
}
|
||||
this.sync.storeTxs([tx.hash], null, function(err) {
|
||||
if (err) {
|
||||
console.log('[PeerSync.js.71:err:]',err); //TODO
|
||||
|
||||
console.log('[PeerSync.js.71:err:]',err); //TODO
|
||||
console.log('[p2p_sync] Error in handle TX: ' + JSON.stringify(err));
|
||||
}
|
||||
});
|
||||
|
|
|
@ -22,6 +22,7 @@ angular.module('insight.transactions').controller('transactionsController',
|
|||
txId: txid
|
||||
}, function(tx) {
|
||||
$scope.tx = tx;
|
||||
console.log(console.log(tx));
|
||||
$scope.txs.push(tx);
|
||||
}, function() {
|
||||
$rootScope.flashMessage = 'Transaction Not Found';
|
||||
|
@ -45,7 +46,6 @@ angular.module('insight.transactions').controller('transactionsController',
|
|||
});
|
||||
};
|
||||
var socket = get_socket($scope);
|
||||
console.log('transactions.js');
|
||||
socket.on('atx', function(tx) {
|
||||
console.log('Incoming transaction for address!', tx);
|
||||
$scope.findTx(tx.txid);
|
||||
|
|
Loading…
Reference in New Issue