tests: enforce witness transactions use legacy txId
This commit is contained in:
parent
87269fe73e
commit
5150e3c027
2 changed files with 105 additions and 111 deletions
test
|
@ -170,24 +170,18 @@ describe('Transaction', function () {
|
|||
})
|
||||
})
|
||||
|
||||
describe('getId', function () {
|
||||
fixtures.valid.forEach(function (f) {
|
||||
describe('getHash/getId', function () {
|
||||
function verify (f) {
|
||||
it('should return the id for ' + f.id, function () {
|
||||
var tx = Transaction.fromHex(f.hex)
|
||||
|
||||
assert.strictEqual(tx.getHash().toString('hex'), f.hash)
|
||||
assert.strictEqual(tx.getId(), f.id)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
describe('getHash', function () {
|
||||
fixtures.valid.forEach(function (f) {
|
||||
it('should return the hash for ' + f.id, function () {
|
||||
var tx = Transaction.fromHex(f.hex)
|
||||
|
||||
assert.strictEqual(tx.getHash().toString('hex'), f.hash)
|
||||
})
|
||||
})
|
||||
fixtures.valid.forEach(verify)
|
||||
fixtures.witness.forEach(verify)
|
||||
})
|
||||
|
||||
describe('isCoinbase', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue