mempool: correct memusage numbers.
This commit is contained in:
parent
92d896c729
commit
653163929e
@ -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;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user