tx/block: s/32/u32/g

This commit is contained in:
Christopher Jeffrey 2016-10-03 05:32:39 -07:00
parent 476cc48702
commit 5010c5588b
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
6 changed files with 9 additions and 9 deletions

View File

@ -491,7 +491,7 @@ ChainEntry.fromBlock = function fromBlock(chain, block, prev) {
ChainEntry.prototype.toRaw = function toRaw(writer) {
var p = new BufferWriter(writer);
p.write32(this.version);
p.writeU32(this.version);
p.writeHash(this.prevBlock);
p.writeHash(this.merkleRoot);
p.writeU32(this.ts);

View File

@ -142,7 +142,7 @@ CompactBlock.prototype.frame = function frame(witness, writer) {
var p = BufferWriter(writer);
var i, id, lo, hi, ptx;
p.write32(this.version);
p.writeU32(this.version);
p.writeHash(this.prevBlock);
p.writeHash(this.merkleRoot);
p.writeU32(this.ts);

View File

@ -158,7 +158,7 @@ AbstractBlock.prototype.hash = function hash(enc) {
AbstractBlock.prototype.abbr = function abbr(writer) {
var p = BufferWriter(writer);
p.write32(this.version);
p.writeU32(this.version);
p.writeHash(this.prevBlock);
p.writeHash(this.merkleRoot);
p.writeU32(this.ts);

View File

@ -743,7 +743,7 @@ Block.prototype.frame = function frame(witness, writer) {
var witnessSize = 0;
var i, tx;
p.write32(this.version);
p.writeU32(this.version);
p.writeHash(this.prevBlock);
p.writeHash(this.merkleRoot);
p.writeU32(this.ts);

View File

@ -85,7 +85,7 @@ Headers.prototype.inspect = function inspect() {
Headers.prototype.toRaw = function toRaw(writer) {
var p = BufferWriter(writer);
p.write32(this.version);
p.writeU32(this.version);
p.writeHash(this.prevBlock);
p.writeHash(this.merkleRoot);
p.writeU32(this.ts);

View File

@ -484,7 +484,7 @@ TX.prototype.signatureHashV0 = function signatureHashV0(index, prev, type) {
// Remove all code separators.
prev = prev.removeSeparators();
p.write32(this.version);
p.writeU32(this.version);
if (type & constants.hashType.ANYONECANPAY) {
p.writeVarint(1);
@ -638,7 +638,7 @@ TX.prototype.signatureHashV1 = function signatureHashV1(index, prev, type) {
hashOutputs = utils.copy(constants.ZERO_HASH);
}
p.write32(this.version);
p.writeU32(this.version);
p.writeBytes(hashPrevouts);
p.writeBytes(hashSequence);
p.writeHash(this.inputs[index].prevout.hash);
@ -2248,7 +2248,7 @@ TX.prototype.frameNormal = function frameNormal(writer) {
if (this.inputs.length === 0 && this.outputs.length !== 0)
throw new Error('Cannot serialize zero-input tx.');
p.write32(this.version);
p.writeU32(this.version);
p.writeVarint(this.inputs.length);
@ -2286,7 +2286,7 @@ TX.prototype.frameWitness = function frameWitness(writer) {
if (this.inputs.length === 0 && this.outputs.length !== 0)
throw new Error('Cannot serialize zero-input tx.');
p.write32(this.version);
p.writeU32(this.version);
p.writeU8(0);
p.writeU8(this.flag);