txdb: fix rpc categorization.
This commit is contained in:
parent
abd267b7d2
commit
e8cb71447c
@ -2106,9 +2106,7 @@ Details.prototype.isReceive = function isReceive() {
|
||||
|
||||
for (i = 0; i < this.inputs.length; i++) {
|
||||
input = this.inputs[i];
|
||||
if (!input.path)
|
||||
continue;
|
||||
if (input.path.id === this.id)
|
||||
if (input.path)
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2117,19 +2115,18 @@ Details.prototype.isReceive = function isReceive() {
|
||||
|
||||
Details.prototype.getValue = function getValue() {
|
||||
var value = 0;
|
||||
var i, vector, member;
|
||||
|
||||
if (this.isReceive())
|
||||
vector = this.outputs;
|
||||
else
|
||||
vector = this.inputs;
|
||||
var receive = this.isReceive();
|
||||
var i, member;
|
||||
|
||||
for (i = 0; i < this.outputs.length; i++) {
|
||||
member = this.outputs[i];
|
||||
if (!member.path)
|
||||
continue;
|
||||
if (member.path.id !== this.id)
|
||||
continue;
|
||||
if (receive) {
|
||||
if (!member.path)
|
||||
continue;
|
||||
} else {
|
||||
if (member.path)
|
||||
continue;
|
||||
}
|
||||
value += member.value;
|
||||
}
|
||||
|
||||
@ -2137,19 +2134,18 @@ Details.prototype.getValue = function getValue() {
|
||||
};
|
||||
|
||||
Details.prototype.getMember = function getMember() {
|
||||
var i, vector, member;
|
||||
|
||||
if (this.isReceive())
|
||||
vector = this.outputs;
|
||||
else
|
||||
vector = this.inputs;
|
||||
var receive = this.isReceive();
|
||||
var i, member;
|
||||
|
||||
for (i = 0; i < this.outputs.length; i++) {
|
||||
member = this.outputs[i];
|
||||
if (!member.path)
|
||||
continue;
|
||||
if (member.path.id !== this.id)
|
||||
continue;
|
||||
if (receive) {
|
||||
if (!member.path)
|
||||
continue;
|
||||
} else {
|
||||
if (member.path)
|
||||
continue;
|
||||
}
|
||||
return member;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user