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

Method verify

projects/JavaScript/proto/protoex.js:3989–4001  ·  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

3987 * @returns {!boolean} Model valid state
3988 */
3989 verify () {
3990 if ((this.buffer.offset + this._model.fbeOffset) > this.buffer.size) {
3991 return false
3992 }
3993
3994 let fbeStructSize = this.readUInt32(this._model.fbeOffset - 8)
3995 let fbeStructType = this.readUInt32(this._model.fbeOffset - 4)
3996 if ((fbeStructSize <= 0) || (fbeStructType !== this.fbeType)) {
3997 return false
3998 }
3999
4000 return ((8 + this._model.verify()) === fbeStructSize)
4001 }
4002
4003 /**
4004 * Serialize the struct value

Callers

nothing calls this directly

Calls 2

readUInt32Method · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected