toRaw() {
    const bw = bio.write(200);

    bw.writeU32(this.version);
    bw.writeHash(this.prevBlock);
    bw.writeHash(this.merkleRoot);
    bw.writeU32(this.time);
    bw.writeU32(this.bits);
    bw.writeU32(this.nonce);
    bw.writeHash(this.vchBlockSig)
    bw.writeU32(this.height);
    bw.writeU32(this.flags);
    bw.writeU64BI(this.stakeModifier);
    if (this.isProofOfStake()) {
      this.prevoutStake.toWriter(bw);
      bw.writeU32(this.stakeTime);
    } else {
      new Outpoint().toWriter(bw);
      bw.writeU32(0);
    }

    bw.writeBytes(this.chainwork.toArrayLike(Buffer, 'le', 32));

    return bw.render();
  }
/**
   * Serialize the entry to internal database format.
   * @returns {Buffer}
   */
Serialize the entry to internal database format.
@returns {Buffer}
Serialize the entry to internal database format . @returns { Buffer }
toRaw() {
    const bw = bio.write(200);
    bw.writeU32(this.version);
    bw.writeHash(this.prevBlock);
    bw.writeHash(this.merkleRoot);
    bw.writeU32(this.time);
    bw.writeU32(this.bits);
    bw.writeU32(this.nonce);
    bw.writeHash(this.vchBlockSig)
    bw.writeU32(this.height);
    bw.writeU32(this.flags);
    bw.writeU64BI(this.stakeModifier);
    if (this.isProofOfStake()) {
      this.prevoutStake.toWriter(bw);
      bw.writeU32(this.stakeTime);
    } else {
      new Outpoint().toWriter(bw);
      bw.writeU32(0);
    }
    bw.writeBytes(this.chainwork.toArrayLike(Buffer, 'le', 32));
    return bw.render();
  }
toRaw ( ) { const bw = bio . write ( 200 ) ; bw . writeU32 ( this . version ) ; bw . writeHash ( this . prevBlock ) ; bw . writeHash ( this . merkleRoot ) ; bw . writeU32 ( this . time ) ; bw . writeU32 ( this . bits ) ; bw . writeU32 ( this . nonce ) ; bw . writeHash ( this . vchBlockSig ) bw . writeU32 ( this . height ) ; bw . writeU32 ( this . flags ) ; bw . writeU64BI ( this . stakeModifier ) ; if ( this . isProofOfStake ( ) ) { this . prevoutStake . toWriter ( bw ) ; bw . writeU32 ( this . stakeTime ) ; } else { new Outpoint ( ) . toWriter ( bw ) ; bw . writeU32 ( 0 ) ; } bw . writeBytes ( this . chainwork . toArrayLike ( Buffer , 'le' , 32 ) ) ; return bw . render ( ) ; }
Serialize the entry to internal database format.
Serialize the entry to internal database format .