UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

13 lines 517 B
/** * Assert that an array of deposits are consecutive and ascending */ export function assertConsecutiveDeposits(depositEvents) { for (let i = 0; i < depositEvents.length - 1; i++) { const indexLeft = depositEvents[i].index; const indexRight = depositEvents[i + 1].index; if (indexLeft !== indexRight - 1) { throw Error(`Non consecutive deposits. deposit[${i}] = ${indexLeft}, deposit[${i + 1}] ${indexRight}`); } } } //# sourceMappingURL=eth1DepositEvent.js.map