Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov committed Oct 30, 2023
2 parents eedf1f2 + 395665b commit a410076
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/instantlock/instantlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class InstantLock {
signature,
};

if (version === 1) {
if (version >= 1) {
result.version = version;
result.cyclehash = cyclehash;
}
Expand Down Expand Up @@ -406,7 +406,7 @@ class InstantLock {
signature: this.signature.toString('hex'),
};

if (this.version === 1) {
if (this.version >= 1) {
result.version = this.version;
result.cyclehash = this.cyclehash;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/transaction/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ Transaction.prototype.getOutPointBuffer = function getOutPointBuffer(
);
}

var binaryTransactionHash = Buffer.from(this.hash, 'hex');
var binaryTransactionHash = this._getHash();
var indexBuffer = Buffer.alloc(4);

indexBuffer.writeUInt32LE(outputIndex, 0);
Expand Down
2 changes: 1 addition & 1 deletion test/transaction/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ describe('Transaction', function () {

var outPointBuffer = transaction.getOutPointBuffer(0);

expect(outPointBuffer.toString('hex')).to.be.equal(txHash + indexHex);
expect(outPointBuffer.toString('hex')).to.be.equal(transaction._getHash().toString('hex') + indexHex);
expect(outPointBuffer.length).to.be.equal(36);
});

Expand Down

0 comments on commit a410076

Please sign in to comment.