Changes internal serialization to use Buffers instead
This commit is contained in:
parent
c8bda6dde6
commit
a8cf2fdd9e
5 changed files with 123 additions and 78 deletions
|
@ -72,7 +72,7 @@ describe('Transaction', function() {
|
|||
|
||||
it('assigns hash to deserialized object', function(){
|
||||
var hashHex = "a9d4599e15b53f3eb531608ddb31f48c695c3d0b3538a6bda871e8b34f2f430c"
|
||||
assert.equal(b2h(tx.hash), hashHex)
|
||||
assert.equal(tx.hash, hashHex)
|
||||
})
|
||||
|
||||
it('decodes large inputs correctly', function() {
|
||||
|
|
|
@ -4,7 +4,6 @@ var T = require('../src/transaction.js')
|
|||
var Transaction = T.Transaction
|
||||
var TransactionOut = T.TransactionOut
|
||||
var Script = require('../src/script.js')
|
||||
var convert = require('../src/convert.js')
|
||||
var assert = require('assert')
|
||||
var sinon = require('sinon')
|
||||
var crypto = require('../').crypto
|
||||
|
@ -338,7 +337,7 @@ describe('Wallet', function() {
|
|||
|
||||
function verifyOutputAdded(index) {
|
||||
var txOut = tx.outs[index]
|
||||
var key = convert.bytesToHex(tx.getHash()) + ":" + index
|
||||
var key = tx.getHash() + ":" + index
|
||||
var output = wallet.outputs[key]
|
||||
assert.equal(output.receive, key)
|
||||
assert.equal(output.value, txOut.value)
|
||||
|
@ -367,7 +366,7 @@ describe('Wallet', function() {
|
|||
var key = txIn.outpoint.hash + ":" + txIn.outpoint.index
|
||||
var output = wallet.outputs[key]
|
||||
|
||||
assert.equal(output.spend, convert.bytesToHex(tx.getHash()) + ':' + 0)
|
||||
assert.equal(output.spend, tx.getHash() + ':' + 0)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue