minor fixes.
This commit is contained in:
parent
350ca9c875
commit
3625a4f4c9
@ -560,7 +560,7 @@ script.execute = function execute(s, stack, tx, index, recurse) {
|
|||||||
n = new bn(0);
|
n = new bn(0);
|
||||||
switch (o) {
|
switch (o) {
|
||||||
case 'add':
|
case 'add':
|
||||||
n = n1.add(b2);
|
n = n1.add(n2);
|
||||||
break;
|
break;
|
||||||
case 'sub':
|
case 'sub':
|
||||||
n = n1.sub(n2);
|
n = n1.sub(n2);
|
||||||
|
|||||||
@ -852,10 +852,10 @@ TX.prototype.getConfirmations = function getConfirmations(chain) {
|
|||||||
if (!chain)
|
if (!chain)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
top = chain.index.heights[chain.index.heights.length - 1];
|
top = chain.getHeight(chain.index.hashes[chain.index.hashes.length - 1]);
|
||||||
height = this.getHeight(chain);
|
height = this.getHeight(chain);
|
||||||
|
|
||||||
if (height === -1)
|
if (top === -1 || height === -1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return top - height + 1;
|
return top - height + 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user