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

Method verify

projects/JavaScript/proto/protoex.js:2819–2831  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

2817 * @returns {!boolean} Model valid state
2818 */
2819 verify () {
2820 if ((this.buffer.offset + this._model.fbeOffset) > this.buffer.size) {
2821 return false
2822 }
2823
2824 let fbeStructSize = this.readUInt32(this._model.fbeOffset - 8)
2825 let fbeStructType = this.readUInt32(this._model.fbeOffset - 4)
2826 if ((fbeStructSize <= 0) || (fbeStructType !== this.fbeType)) {
2827 return false
2828 }
2829
2830 return ((8 + this._model.verify()) === fbeStructSize)
2831 }
2832
2833 /**
2834 * Serialize the struct value

Callers

nothing calls this directly

Calls 2

readUInt32Method · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected