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

Method verify

projects/JavaScript/proto/proto.js:1793–1805  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

1791 * @returns {!boolean} Model valid state
1792 */
1793 verify () {
1794 if ((this.buffer.offset + this._model.fbeOffset) > this.buffer.size) {
1795 return false
1796 }
1797
1798 let fbeStructSize = this.readUInt32(this._model.fbeOffset - 8)
1799 let fbeStructType = this.readUInt32(this._model.fbeOffset - 4)
1800 if ((fbeStructSize <= 0) || (fbeStructType !== this.fbeType)) {
1801 return false
1802 }
1803
1804 return ((8 + this._model.verify()) === fbeStructSize)
1805 }
1806
1807 /**
1808 * Serialize the struct value

Callers

nothing calls this directly

Calls 2

readUInt32Method · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected