Skip to content
This repository was archived by the owner on Jun 3, 2020. It is now read-only.

Commit fc690d4

Browse files
committed
tests: rename txid to id in Transaction context
1 parent ca4e64d commit fc690d4

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

test/fixtures/transaction.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"valid": [
33
{
44
"description": "Standard transaction (1:1)",
5-
"txid": "a0ff943d3f644d8832b1fa74be4d0ad2577615dc28a7ef74ff8c271b603a082a",
5+
"id": "a0ff943d3f644d8832b1fa74be4d0ad2577615dc28a7ef74ff8c271b603a082a",
66
"hash": "2a083a601b278cff74efa728dc157657d20a4dbe74fab132884d643f3d94ffa0",
77
"raw": {
88
"version": 1,
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"description": "Standard transaction (2:2)",
28-
"txid": "fcdd6d89c43e76dcff94285d9b6e31d5c60cb5e397a76ebc4920befad30907bc",
28+
"id": "fcdd6d89c43e76dcff94285d9b6e31d5c60cb5e397a76ebc4920befad30907bc",
2929
"hash": "bc0709d3fabe2049bc6ea797e3b50cc6d5316e9b5d2894ffdc763ec4896dddfc",
3030
"raw": {
3131
"version": 1,
@@ -59,7 +59,7 @@
5959
},
6060
{
6161
"description": "Standard transaction (14:2)",
62-
"txid": "39d57bc27f72e904d81f6b5ef7b4e6e17fa33a06b11e5114a43435830d7b5563",
62+
"id": "39d57bc27f72e904d81f6b5ef7b4e6e17fa33a06b11e5114a43435830d7b5563",
6363
"hash": "63557b0d833534a414511eb1063aa37fe1e6b4f75e6b1fd804e9727fc27bd539",
6464
"raw": {
6565
"version": 1,

test/transaction.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('Transaction', function() {
3030

3131
describe('fromBuffer/fromHex', function() {
3232
fixtures.valid.forEach(function(f) {
33-
it('imports ' + f.txid + ' correctly', function() {
33+
it('imports ' + f.id + ' correctly', function() {
3434
var actual = Transaction.fromHex(f.hex)
3535

3636
assert.deepEqual(actual.toHex(), f.hex)
@@ -48,7 +48,7 @@ describe('Transaction', function() {
4848

4949
describe('toBuffer/toHex', function() {
5050
fixtures.valid.forEach(function(f) {
51-
it('exports ' + f.txid + ' correctly', function() {
51+
it('exports ' + f.id + ' correctly', function() {
5252
var actual = fromRaw(f.raw)
5353

5454
assert.deepEqual(actual.toHex(), f.hex)
@@ -109,7 +109,7 @@ describe('Transaction', function() {
109109
})
110110

111111
fixtures.valid.forEach(function(f) {
112-
it('should add the inputs for ' + f.txid + ' correctly', function() {
112+
it('should add the inputs for ' + f.id + ' correctly', function() {
113113
var tx = new Transaction()
114114

115115
f.raw.ins.forEach(function(txIn, i) {
@@ -183,7 +183,7 @@ describe('Transaction', function() {
183183
})
184184

185185
fixtures.valid.forEach(function(f) {
186-
it('should add the outputs for ' + f.txid + ' correctly', function() {
186+
it('should add the outputs for ' + f.id + ' correctly', function() {
187187
var tx = new Transaction()
188188

189189
f.raw.outs.forEach(function(txOut, i) {
@@ -215,18 +215,18 @@ describe('Transaction', function() {
215215

216216
describe('getId', function() {
217217
fixtures.valid.forEach(function(f) {
218-
it('should return the txid for ' + f.txid, function() {
218+
it('should return the id for ' + f.id, function() {
219219
var tx = Transaction.fromHex(f.hex)
220220
var actual = tx.getId()
221221

222-
assert.equal(actual, f.txid)
222+
assert.equal(actual, f.id)
223223
})
224224
})
225225
})
226226

227227
describe('getHash', function() {
228228
fixtures.valid.forEach(function(f) {
229-
it('should return the hash for ' + f.txid, function() {
229+
it('should return the hash for ' + f.id, function() {
230230
var tx = Transaction.fromHex(f.hex)
231231
var actual = tx.getHash().toString('hex')
232232

0 commit comments

Comments
 (0)