fixes for script and tx.
This commit is contained in:
parent
93efe376a6
commit
59777baf71
@ -36,7 +36,7 @@ Witness.encode = function encode(witness) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Witness.decode = function decode(buf) {
|
Witness.decode = function decode(buf) {
|
||||||
return bcoin.protocol.parser.parseTX(buf).items;
|
return bcoin.protocol.parser.parseWitness(buf).witness.items;
|
||||||
};
|
};
|
||||||
|
|
||||||
Witness.prototype.clone = function clone() {
|
Witness.prototype.clone = function clone() {
|
||||||
|
|||||||
@ -1100,7 +1100,7 @@ TX._fromExtended = function _fromExtended(buf, saveCoins) {
|
|||||||
coin = p.readVarBytes();
|
coin = p.readVarBytes();
|
||||||
if (coin.length === 0)
|
if (coin.length === 0)
|
||||||
continue;
|
continue;
|
||||||
coin = bcoin.protocol.parser.parseCoin(p, false);
|
coin = bcoin.protocol.parser.parseCoin(coin, false);
|
||||||
coin.hash = tx.inputs[i].prevout.hash;
|
coin.hash = tx.inputs[i].prevout.hash;
|
||||||
coin.index = tx.inputs[i].prevout.index;
|
coin.index = tx.inputs[i].prevout.index;
|
||||||
coin.spent = false;
|
coin.spent = false;
|
||||||
@ -1113,8 +1113,8 @@ TX._fromExtended = function _fromExtended(buf, saveCoins) {
|
|||||||
return tx;
|
return tx;
|
||||||
};
|
};
|
||||||
|
|
||||||
TX.fromExtended = function fromExtended(buf, coins) {
|
TX.fromExtended = function fromExtended(buf, saveCoins) {
|
||||||
return new TX(TX._fromExtended(buf, coins));
|
return new TX(TX._fromExtended(buf, saveCoins));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user