Working local sim (without waiting genesis)
This commit is contained in:
parent
96ac81c89f
commit
9cd8a6c730
|
@ -675,7 +675,8 @@ proc processDeposits(m: MainchainMonitor,
|
||||||
let eth1Blocks = await dataProvider.fetchDepositData(latestKnownBlock + 1,
|
let eth1Blocks = await dataProvider.fetchDepositData(latestKnownBlock + 1,
|
||||||
Eth1BlockNumber blk.number)
|
Eth1BlockNumber blk.number)
|
||||||
if eth1Blocks.len == 0:
|
if eth1Blocks.len == 0:
|
||||||
if m.eth1Chain.maxValidDeposits > totalDepositsNeededForGenesis:
|
if m.eth1Chain.maxValidDeposits > totalDepositsNeededForGenesis and
|
||||||
|
m.eth1Chain.knownStart.deposit_count == 0:
|
||||||
let latestEth1Data = m.eth1Chain.latestEth1Data
|
let latestEth1Data = m.eth1Chain.latestEth1Data
|
||||||
|
|
||||||
for missingBlockNum in latestKnownBlock + 1 ..< Eth1BlockNumber(blk.number):
|
for missingBlockNum in latestKnownBlock + 1 ..< Eth1BlockNumber(blk.number):
|
||||||
|
@ -757,7 +758,7 @@ proc run(m: MainchainMonitor, delayBeforeStart: Duration) {.async.} =
|
||||||
await close(dataProvider)
|
await close(dataProvider)
|
||||||
|
|
||||||
proc safeCancel(fut: var Future[void]) =
|
proc safeCancel(fut: var Future[void]) =
|
||||||
if not fut.isNil:
|
if not fut.isNil and not fut.finished:
|
||||||
fut.cancel()
|
fut.cancel()
|
||||||
fut = nil
|
fut = nil
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,7 @@ if [ ! -f "${SNAPSHOT_FILE}" ]; then
|
||||||
$BEACON_NODE_BIN \
|
$BEACON_NODE_BIN \
|
||||||
--data-dir="${SIMULATION_DIR}/node-$BOOTSTRAP_NODE" \
|
--data-dir="${SIMULATION_DIR}/node-$BOOTSTRAP_NODE" \
|
||||||
createTestnet \
|
createTestnet \
|
||||||
|
$WEB3_ARG \
|
||||||
--validators-dir="${VALIDATORS_DIR}" \
|
--validators-dir="${VALIDATORS_DIR}" \
|
||||||
--total-validators="${NUM_VALIDATORS}" \
|
--total-validators="${NUM_VALIDATORS}" \
|
||||||
--output-genesis="${SNAPSHOT_FILE}" \
|
--output-genesis="${SNAPSHOT_FILE}" \
|
||||||
|
|
Loading…
Reference in New Issue