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

Method verify

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

1952 * @returns {!boolean} Model valid state
1953 */
1954 verify () {
1955 if ((this.buffer.offset + this._model.fbeOffset) > this.buffer.size) {
1956 return false
1957 }
1958
1959 let fbeStructSize = this.readUInt32(this._model.fbeOffset - 8)
1960 let fbeStructType = this.readUInt32(this._model.fbeOffset - 4)
1961 if ((fbeStructSize <= 0) || (fbeStructType !== this.fbeType)) {
1962 return false
1963 }
1964
1965 return ((8 + this._model.verify()) === fbeStructSize)
1966 }
1967
1968 /**
1969 * Serialize the struct value

Callers

nothing calls this directly

Calls 2

readUInt32Method · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected