@lodestar/state-transition 1.48.0-dev.d55b13cf5e → 1.48.0-dev.dd957b093d

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.
@@ -1,6 +1,6 @@
1
1
  import {CompactMultiProof} from "@chainsafe/persistent-merkle-tree";
2
2
  import {BitArray, ByteViews} from "@chainsafe/ssz";
3
- import {ForkName} from "@lodestar/params";
3
+ import {ForkName, ForkSeq} from "@lodestar/params";
4
4
  import {
5
5
  BeaconBlock,
6
6
  BeaconState,
@@ -66,6 +66,7 @@ import {
66
66
  export class NativeBeaconStateView implements IBeaconStateViewLatestFork {
67
67
  // phase0
68
68
  private _forkName: ForkName | null = null;
69
+ private _forkSeq: ForkSeq | null = null;
69
70
  private _slot: Slot | null = null;
70
71
  private _fork: Fork | null = null;
71
72
  private _epoch: Epoch | null = null;
@@ -194,6 +195,13 @@ export class NativeBeaconStateView implements IBeaconStateViewLatestFork {
194
195
  return this._forkName;
195
196
  }
196
197
 
198
+ get forkSeq(): ForkSeq {
199
+ if (this._forkSeq === null) {
200
+ this._forkSeq = this.binding.forkSeq;
201
+ }
202
+ return this._forkSeq;
203
+ }
204
+
197
205
  get slot(): Slot {
198
206
  if (this._slot === null) {
199
207
  this._slot = this.binding.slot;