mempool: correct memusage numbers.

This commit is contained in:
Christopher Jeffrey 2017-02-28 20:46:30 -08:00
parent 92d896c729
commit 653163929e
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1855,18 +1855,19 @@ Mempool.prototype.memUsage = function memUsage(tx) {
var mem = 0;
var i, j, input, output, op;
mem += 272; // tx
mem += 208; // tx
mem += 80; // _hash
mem += 88; // _hhash
mem += 80; // _raw
mem += 80; // _whash
mem += 48; // mutable
mem += 32; // input array
for (i = 0; i < tx.inputs.length; i++) {
input = tx.inputs[i];
mem += 144; // input
mem += 120; // input
mem += 104; // prevout
mem += 88; // prevout hash
@ -1891,7 +1892,7 @@ Mempool.prototype.memUsage = function memUsage(tx) {
for (i = 0; i < tx.outputs.length; i++) {
output = tx.outputs[i];
mem += 120; // output
mem += 104; // output
mem += 40; // script
mem += 80; // script raw buffer
mem += 32; // script code array
@ -1904,7 +1905,7 @@ Mempool.prototype.memUsage = function memUsage(tx) {
}
}
mem += 152; // mempool entry
mem += 176; // mempool entry
return mem;
};