diff --git a/test/transaction.js b/test/transaction.js index 35beb81..62c24d0 100644 --- a/test/transaction.js +++ b/test/transaction.js @@ -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 () { var prevTxHash beforeEach(function () {