@cmts-dev/carmentis-sdk-core 1.2.16 → 1.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12087,6 +12087,8 @@ var { NEVER: mx, ALWAYS: hx, DECIMAL_ROUND: gx, DECIMAL_FIT: _x } = Lb, vx = 204
|
|
|
12087
12087
|
return this.getHeight() === 0;
|
|
12088
12088
|
}
|
|
12089
12089
|
async appendMicroBlock(e) {
|
|
12090
|
+
if (!e || !(e instanceof Kx)) throw Error("Microblock cannot be null or undefined");
|
|
12091
|
+
if (e.getType() !== this.type) throw Error("Invalid microblock type for append operation");
|
|
12090
12092
|
if (this.isEmpty() && this.identifier instanceof Uint8Array) throw Error("Virtual blockchain is empty but is initialized: should not happen");
|
|
12091
12093
|
if (!this.isEmpty() && !(this.identifier instanceof Uint8Array)) throw Error("Virtual blockchain is empty but has an identifier: should not happen");
|
|
12092
12094
|
let t = this.height + 1, n = e.getHeight();
|