block: use Tx.byteLength to avoid double serialization
This commit is contained in:
parent
ae0001ce37
commit
a8db7b2cbf
1 changed files with 1 additions and 2 deletions
|
@ -44,11 +44,10 @@ Block.fromBuffer = function (buffer) {
|
||||||
return vi.number
|
return vi.number
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: poor performance
|
|
||||||
function readTransaction () {
|
function readTransaction () {
|
||||||
var tx = Transaction.fromBuffer(buffer.slice(offset), true)
|
var tx = Transaction.fromBuffer(buffer.slice(offset), true)
|
||||||
|
|
||||||
offset += tx.toBuffer().length
|
offset += tx.byteLength()
|
||||||
return tx
|
return tx
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue