2016-12-10 19:42:46 -08:00
|
|
|
'use strict';
|
|
|
|
|
|
2017-06-29 20:54:07 -07:00
|
|
|
const heapdump = require('heapdump');
|
|
|
|
|
const MempoolEntry = require('../lib/mempool/mempoolentry');
|
|
|
|
|
const Coins = require('../lib/coins/coins');
|
2017-08-09 15:26:54 -07:00
|
|
|
const common = require('../test/util/common');
|
2016-11-25 21:23:31 -08:00
|
|
|
|
2017-08-12 19:38:58 -07:00
|
|
|
const [tx, view] = common.readTX('tx4').getTX();
|
2017-08-09 15:26:54 -07:00
|
|
|
const coins = Coins.fromTX(tx, 0);
|
|
|
|
|
const entry = MempoolEntry.fromTX(tx, view, 1000000);
|
2016-11-25 21:23:31 -08:00
|
|
|
|
2017-06-29 20:54:07 -07:00
|
|
|
setInterval(() => {
|
2016-11-25 21:23:31 -08:00
|
|
|
console.log(tx.hash('hex'));
|
2017-08-09 15:26:54 -07:00
|
|
|
console.log(coins.outputs.length);
|
2016-11-25 21:23:31 -08:00
|
|
|
console.log(entry.tx);
|
2017-01-06 21:21:37 -08:00
|
|
|
}, 60 * 1000);
|
2016-11-25 21:23:31 -08:00
|
|
|
|
2017-06-29 20:54:07 -07:00
|
|
|
setImmediate(() => {
|
2017-08-12 19:38:58 -07:00
|
|
|
heapdump.writeSnapshot(`${__dirname}/../dump.heapsnapshot`, (err) => {
|
2016-11-25 21:23:31 -08:00
|
|
|
if (err)
|
|
|
|
|
throw err;
|
|
|
|
|
});
|
2017-06-29 20:54:07 -07:00
|
|
|
});
|