Testing virtualSize and weight
This commit is contained in:
parent
4f03a5d32e
commit
f4e3b52325
1 changed files with 18 additions and 0 deletions
|
@ -129,6 +129,24 @@ describe('Transaction', function () {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('weight/virtualSize', function () {
|
||||||
|
it('computes virtual size', function () {
|
||||||
|
fixtures.valid.forEach(function (f) {
|
||||||
|
var transaction = Transaction.fromHex(f.whex ? f.whex : f.hex)
|
||||||
|
|
||||||
|
assert.strictEqual(transaction.virtualSize(), f.virtualSize)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('computes weight', function () {
|
||||||
|
fixtures.valid.forEach(function (f) {
|
||||||
|
var transaction = Transaction.fromHex(f.whex ? f.whex : f.hex)
|
||||||
|
|
||||||
|
assert.strictEqual(transaction.weight(), f.weight)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('addInput', function () {
|
describe('addInput', function () {
|
||||||
var prevTxHash
|
var prevTxHash
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue