MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / verify

Method verify

projects/JavaScript/proto/proto.js:3838–3850  ·  view source on GitHub ↗

* Check if the struct value is valid * @this {!AccountFinalModel} * @returns {!boolean} Model valid state

()

Source from the content-addressed store, hash-verified

3836 * @returns {!boolean} Model valid state
3837 */
3838 verify () {
3839 if ((this.buffer.offset + this._model.fbeOffset) > this.buffer.size) {
3840 return false
3841 }
3842
3843 let fbeStructSize = this.readUInt32(this._model.fbeOffset - 8)
3844 let fbeStructType = this.readUInt32(this._model.fbeOffset - 4)
3845 if ((fbeStructSize <= 0) || (fbeStructType !== this.fbeType)) {
3846 return false
3847 }
3848
3849 return ((8 + this._model.verify()) === fbeStructSize)
3850 }
3851
3852 /**
3853 * Serialize the struct value

Callers

nothing calls this directly

Calls 2

readUInt32Method · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected