diff --git a/beacon_chain/block_pool.nim b/beacon_chain/block_pool.nim index 9aa964876..50c591325 100644 --- a/beacon_chain/block_pool.nim +++ b/beacon_chain/block_pool.nim @@ -81,7 +81,7 @@ proc init*(T: type BlockPool, db: BeaconChainDB): BlockPool = link(newRef, curRef) curRef = curRef.parent blocks[curRef.root] = curRef - trace "Populating block pool", key = curRef.root, val = curRef + debug "Populating block pool", key = curRef.root, val = curRef if latestStateRoot.isNone() and db.containsState(blck.state_root): latestStateRoot = some(blck.state_root) @@ -169,7 +169,7 @@ proc addResolvedBlock( link(parent, blockRef) pool.blocks[blockRoot] = blockRef - trace "Populating block pool", key = blockRoot, val = blockRef + debug "Populating block pool", key = blockRoot, val = blockRef pool.addSlotMapping(blockRef) @@ -352,11 +352,15 @@ proc getBlockRange*(pool: BlockPool, headBlock: Eth2Digest, ## result = output.len + trace "getBlockRange entered", headBlock, startSlot, skipStep + var b = pool.getRef(headBlock) if b == nil: trace "head block not found", headBlock return + trace "head block found", headBlock = b + if b.slot < startSlot: trace "head block is older than startSlot", headBlockSlot = b.slot, startSlot return diff --git a/tests/simulation/vars.sh b/tests/simulation/vars.sh index 78121d7ff..5fb061db7 100644 --- a/tests/simulation/vars.sh +++ b/tests/simulation/vars.sh @@ -20,7 +20,7 @@ cd - &>/dev/null # When changing these, also update the readme section on running simulation # so that the run_node example is correct! NUM_VALIDATORS=${VALIDATORS:-192} -TOTAL_NODES=${NODES:-2} +TOTAL_NODES=${NODES:-4} TOTAL_USER_NODES=${USER_NODES:-0} TOTAL_SYSTEM_NODES=$(( TOTAL_NODES - TOTAL_USER_NODES )) MASTER_NODE=$(( TOTAL_NODES - 1 ))