From 4048daa64b7149b50b2f71b9bebd15c3c6bc7c7a Mon Sep 17 00:00:00 2001 From: benbierens Date: Mon, 6 Jan 2025 14:17:17 +0100 Subject: [PATCH] testing in progress --- codex/blockexchange/engine/engine.nim | 2 +- codex/blockexchange/engine/pendingblocks.nim | 1 + docker/build.bat | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/codex/blockexchange/engine/engine.nim b/codex/blockexchange/engine/engine.nim index 73d3655e..0b02ce61 100644 --- a/codex/blockexchange/engine/engine.nim +++ b/codex/blockexchange/engine/engine.nim @@ -433,7 +433,7 @@ proc wantListHandler*( address: e.address, `type`: BlockPresenceType.DontHave, price: price)) - elif have: + elif have: # and not e.cancel: # Uncomment this for slow mode. # Important todo: This presence can be added in response to a cancel message. # This is ignored by the receiving peer. But not doing so degrades performance. # See: https://github.com/codex-storage/nim-codex/pull/1019#issuecomment-2525089803 diff --git a/codex/blockexchange/engine/pendingblocks.nim b/codex/blockexchange/engine/pendingblocks.nim index 9c5efc0b..a363df87 100644 --- a/codex/blockexchange/engine/pendingblocks.nim +++ b/codex/blockexchange/engine/pendingblocks.nim @@ -53,6 +53,7 @@ proc getWantHandle*( try: if address notin p.blocks: + trace "BlockRequest created", address p.blocks[address] = BlockReq( handle: newFuture[Block]("pendingBlocks.getWantHandle"), inFlight: inFlight, diff --git a/docker/build.bat b/docker/build.bat index 0fe5efc2..c25eabab 100644 --- a/docker/build.bat +++ b/docker/build.bat @@ -1,2 +1,2 @@ -docker build --build-arg MAKE_PARALLEL=4 --build-arg NIMFLAGS="-d:disableMarchNative -d:codex_enable_api_debug_peers=true -d:codex_enable_proof_failures=true -d:codex_use_hardhat=false -d:codex_enable_log_counter=true -d:verify_circuit=true" --build-arg NAT_IP_AUTO=true -t thatbenbierens/nim-codex:blkex-cancelpresence-13 -f codex.Dockerfile .. -docker push thatbenbierens/nim-codex:blkex-cancelpresence-13 +docker build --build-arg MAKE_PARALLEL=4 --build-arg NIMFLAGS="-d:disableMarchNative -d:codex_enable_api_debug_peers=true -d:codex_enable_proof_failures=true -d:codex_use_hardhat=false -d:codex_enable_log_counter=true -d:verify_circuit=true" --build-arg NAT_IP_AUTO=true -t thatbenbierens/nim-codex:blkex-cancelpresence-15 -f codex.Dockerfile .. +docker push thatbenbierens/nim-codex:blkex-cancelpresence-15